Convertor gratuit

Comenzi Vim Cheat Sheet

Fișă cuprinzătoare pentru comenzile Vim. Căutați peste 80 de comenzi Vim esențiale cu exemple, descrieri și copie cu un singur clic.

i
Enter Insert mode before the cursor
Exemplu:i
I
Enter Insert mode at the beginning of the line
Exemplu:I
a
Enter Insert mode after the cursor
Exemplu:a
A
Enter Insert mode at the end of the line
Exemplu:A
o
Open a new line below and enter Insert mode
Exemplu:o
O
Open a new line above and enter Insert mode
Exemplu:O
v
Enter Visual mode (character selection)
Exemplu:v
V
Enter Visual Line mode (line selection)
Exemplu:V
Ctrl+v
Enter Visual Block mode (column selection)
Exemplu:Ctrl+v
:
Enter Command-line mode
Exemplu::w
Esc
Return to Normal mode from any mode
Exemplu:Esc
R
Enter Replace mode (overwrite characters)
Exemplu:R
h
Move cursor left
Exemplu:5h
j
Move cursor down
Exemplu:10j
k
Move cursor up
Exemplu:10k
l
Move cursor right
Exemplu:5l
w
Move to the start of the next word
Exemplu:3w
b
Move to the start of the previous word
Exemplu:3b
e
Move to the end of the current word
Exemplu:2e
0
Move to the beginning of the line
Exemplu:0
^
Move to the first non-blank character of the line
Exemplu:^
$
Move to the end of the line
Exemplu:$
gg
Move to the first line of the file
Exemplu:gg
G
Move to the last line of the file
Exemplu:G
:N
Jump to line number N
Exemplu::42
Ctrl+f
Scroll forward (down) one screen
Exemplu:Ctrl+f
Ctrl+b
Scroll backward (up) one screen
Exemplu:Ctrl+b
Ctrl+d
Scroll down half a screen
Exemplu:Ctrl+d
Ctrl+u
Scroll up half a screen
Exemplu:Ctrl+u
H
Move cursor to the top of the screen
Exemplu:H
M
Move cursor to the middle of the screen
Exemplu:M
L
Move cursor to the bottom of the screen
Exemplu:L
%
Jump to matching bracket, parenthesis, or brace
Exemplu:%
x
Delete the character under the cursor
Exemplu:x
dd
Delete (cut) the current line
Exemplu:dd
dw
Delete from cursor to the end of the word
Exemplu:dw
d$
Delete from cursor to the end of the line
Exemplu:d$
D
Delete from cursor to end of line (same as d$)
Exemplu:D
yy
Yank (copy) the current line
Exemplu:yy
yw
Yank (copy) from cursor to end of word
Exemplu:yw
p
Paste after the cursor
Exemplu:p
P
Paste before the cursor
Exemplu:P
u
Undo the last change
Exemplu:u
Ctrl+r
Redo the last undone change
Exemplu:Ctrl+r
cc
Change (delete and enter insert mode) the current line
Exemplu:cc
cw
Change from cursor to end of word
Exemplu:cw
c$
Change from cursor to end of line
Exemplu:c$
.
Repeat the last change
Exemplu:.
>>
Indent the current line one level to the right
Exemplu:>>
<<
Unindent the current line one level to the left
Exemplu:<<
==
Auto-indent the current line
Exemplu:==
J
Join the current line with the line below
Exemplu:J
~
Toggle case of character under cursor
Exemplu:~
r{char}
Replace the character under the cursor with {char}
Exemplu:ra
/{pattern}
Search forward for pattern
Exemplu:/foo
?{pattern}
Search backward for pattern
Exemplu:?foo
n
Repeat the last search in the same direction
Exemplu:n
N
Repeat the last search in the opposite direction
Exemplu:N
*
Search forward for the word under the cursor
Exemplu:*
#
Search backward for the word under the cursor
Exemplu:#
:s/old/new/g
Replace all occurrences of old with new on the current line
Exemplu::s/foo/bar/g
:%s/old/new/g
Replace all occurrences of old with new in the whole file
Exemplu::%s/foo/bar/g
:%s/old/new/gc
Replace all with confirmation prompts
Exemplu::%s/foo/bar/gc
:noh
Clear the search highlight
Exemplu::noh
:w
Save the current file
Exemplu::w
:w filename
Save the current buffer as a new filename
Exemplu::w newfile.txt
:q
Quit (close the window)
Exemplu::q
:wq
Save and quit
Exemplu::wq
:q!
Quit without saving (force quit)
Exemplu::q!
:x
Save and quit (only writes if changes were made)
Exemplu::x
:e filename
Open a file for editing
Exemplu::e README.md
:sp
Split the window horizontally
Exemplu::sp file.txt
:vsp
Split the window vertically
Exemplu::vsp file.txt
Ctrl+w+w
Switch focus to the next split window
Exemplu:Ctrl+w w
Ctrl+w+h/j/k/l
Move focus to the window in the given direction
Exemplu:Ctrl+w l
:close
Close the current window split
Exemplu::close
:only
Close all windows except the current one
Exemplu::only
:bn
Switch to the next buffer
Exemplu::bn
:bp
Switch to the previous buffer
Exemplu::bp
:bd
Delete (close) the current buffer
Exemplu::bd
:ls
List all open buffers
Exemplu::ls
:b N
Switch to buffer number N
Exemplu::b 2
:tabnew
Open a new tab
Exemplu::tabnew file.txt
:tabn
Switch to the next tab
Exemplu::tabn
:tabp
Switch to the previous tab
Exemplu::tabp
:tabclose
Close the current tab
Exemplu::tabclose
gt
Go to the next tab
Exemplu:gt
gT
Go to the previous tab
Exemplu:gT
q{a-z}
Start recording a macro into register {a-z}
Exemplu:qq
q (stop)
Stop recording the current macro
Exemplu:q
@{a-z}
Execute the macro stored in register {a-z}
Exemplu:@q
@@
Repeat the last executed macro
Exemplu:@@
N@{a-z}
Execute macro N times
Exemplu:5@q
:reg
Show the contents of all registers
Exemplu::reg
v then d
Select text in Visual mode then delete it
Exemplu:vwd
v then y
Select text in Visual mode then yank (copy) it
Exemplu:vwy
v then c
Select text in Visual mode then change it
Exemplu:vwc
v then >
Indent selected text to the right
Exemplu:vip>
vip
Select the current paragraph in Visual mode
Exemplu:vip
viw
Select the current word in Visual mode
Exemplu:viw
vis
Select the current sentence in Visual mode
Exemplu:vis
V then J
Select lines in Visual Line mode then join them
Exemplu:VjJ
:set number
Show line numbers
Exemplu::set number
:set nonumber
Hide line numbers
Exemplu::set nonumber
:syntax on
Enable syntax highlighting
Exemplu::syntax on
:colorscheme
Change the color scheme
Exemplu::colorscheme desert
:help {topic}
Open Vim help for a topic
Exemplu::help :w
m{a-z}
Set a mark at the current cursor position
Exemplu:ma
'{a-z}
Jump to the line of a mark
Exemplu:'a
`{a-z}
Jump to the exact position of a mark
Exemplu:`a
:set paste
Enable paste mode to avoid auto-indent issues
Exemplu::set paste
:set ignorecase
Make searches case-insensitive
Exemplu::set ignorecase
:set hlsearch
Highlight all search matches
Exemplu::set hlsearch
ga
Show the ASCII value of the character under the cursor
Exemplu:ga
zz
Center the current line on the screen
Exemplu:zz
Ctrl+g
Show the current file name and cursor position
Exemplu:Ctrl+g

Despre acest instrument

Un ghid cuprinzător de referință rapidă pentru comenzile vim. Răsfoiți comenzile, sintaxa și exemplele utilizate frecvent, organizate pe categorii. Căutare și compatibil cu dispozitivele mobile — marcați această pagină pentru acces instantaneu atunci când aveți nevoie de un memento rapid.

Cum se utilizează

  1. Răsfoiți secțiunile de referință clasificate.
  2. Utilizați bara de căutare pentru a găsi anumite comenzi sau sintaxă.
  3. Faceți clic pe orice intrare pentru a vedea exemple de utilizare și explicații.
  4. Copiați direct comenzile pentru a le utiliza în terminalul sau editorul dvs.

Întrebări frecvente

Este această referință actualizată?
Referința acoperă comenzi și sintaxa utilizate pe scară largă, care sunt stabile în toate versiunile. Pentru cele mai recente completări sau caracteristici specifice versiunii, verificați documentația oficială.
Pot folosi acest lucru offline?
Odată încărcată, pagina funcționează fără conexiune la internet. Marcați-l pentru acces rapid — tot conținutul este redat în browser fără alte solicitări de rețea.
Este aceasta cuprinzătoare sau doar elementele de bază?
Acoperă cele mai frecvent utilizate comenzi și modele care se ocupă de 90% din sarcinile de zi cu zi. Pentru funcții de nișă sau avansate, consultați documentația oficială.
Pot sugera completări?
Ne actualizăm în mod regulat referințele. Dacă observați comenzi lipsă sau aveți sugestii, anunțați-ne prin pagina noastră de contact.