Conversor Gratuito
Comandos Vim Folha de Dicas
Folha de dicas completa de comandos Vim. Pesquise mais de 80 comandos Vim essenciais com exemplos, descrições e cópia com um clique.
i
Enter Insert mode before the cursor
Exemplo:
iI
Enter Insert mode at the beginning of the line
Exemplo:
Ia
Enter Insert mode after the cursor
Exemplo:
aA
Enter Insert mode at the end of the line
Exemplo:
Ao
Open a new line below and enter Insert mode
Exemplo:
oO
Open a new line above and enter Insert mode
Exemplo:
Ov
Enter Visual mode (character selection)
Exemplo:
vV
Enter Visual Line mode (line selection)
Exemplo:
VCtrl+v
Enter Visual Block mode (column selection)
Exemplo:
Ctrl+v:
Enter Command-line mode
Exemplo:
:wEsc
Return to Normal mode from any mode
Exemplo:
EscR
Enter Replace mode (overwrite characters)
Exemplo:
Rh
Move cursor left
Exemplo:
5hj
Move cursor down
Exemplo:
10jk
Move cursor up
Exemplo:
10kl
Move cursor right
Exemplo:
5lw
Move to the start of the next word
Exemplo:
3wb
Move to the start of the previous word
Exemplo:
3be
Move to the end of the current word
Exemplo:
2e0
Move to the beginning of the line
Exemplo:
0^
Move to the first non-blank character of the line
Exemplo:
^$
Move to the end of the line
Exemplo:
$gg
Move to the first line of the file
Exemplo:
ggG
Move to the last line of the file
Exemplo:
G:N
Jump to line number N
Exemplo:
:42Ctrl+f
Scroll forward (down) one screen
Exemplo:
Ctrl+fCtrl+b
Scroll backward (up) one screen
Exemplo:
Ctrl+bCtrl+d
Scroll down half a screen
Exemplo:
Ctrl+dCtrl+u
Scroll up half a screen
Exemplo:
Ctrl+uH
Move cursor to the top of the screen
Exemplo:
HM
Move cursor to the middle of the screen
Exemplo:
ML
Move cursor to the bottom of the screen
Exemplo:
L%
Jump to matching bracket, parenthesis, or brace
Exemplo:
%x
Delete the character under the cursor
Exemplo:
xdd
Delete (cut) the current line
Exemplo:
dddw
Delete from cursor to the end of the word
Exemplo:
dwd$
Delete from cursor to the end of the line
Exemplo:
d$D
Delete from cursor to end of line (same as d$)
Exemplo:
Dyy
Yank (copy) the current line
Exemplo:
yyyw
Yank (copy) from cursor to end of word
Exemplo:
ywp
Paste after the cursor
Exemplo:
pP
Paste before the cursor
Exemplo:
Pu
Undo the last change
Exemplo:
uCtrl+r
Redo the last undone change
Exemplo:
Ctrl+rcc
Change (delete and enter insert mode) the current line
Exemplo:
cccw
Change from cursor to end of word
Exemplo:
cwc$
Change from cursor to end of line
Exemplo:
c$.
Repeat the last change
Exemplo:
.>>
Indent the current line one level to the right
Exemplo:
>><<
Unindent the current line one level to the left
Exemplo:
<<==
Auto-indent the current line
Exemplo:
==J
Join the current line with the line below
Exemplo:
J~
Toggle case of character under cursor
Exemplo:
~r{char}
Replace the character under the cursor with {char}
Exemplo:
ra/{pattern}
Search forward for pattern
Exemplo:
/foo?{pattern}
Search backward for pattern
Exemplo:
?foon
Repeat the last search in the same direction
Exemplo:
nN
Repeat the last search in the opposite direction
Exemplo:
N*
Search forward for the word under the cursor
Exemplo:
*#
Search backward for the word under the cursor
Exemplo:
#:s/old/new/g
Replace all occurrences of old with new on the current line
Exemplo:
:s/foo/bar/g:%s/old/new/g
Replace all occurrences of old with new in the whole file
Exemplo:
:%s/foo/bar/g:%s/old/new/gc
Replace all with confirmation prompts
Exemplo:
:%s/foo/bar/gc:noh
Clear the search highlight
Exemplo:
:noh:w
Save the current file
Exemplo:
:w:w filename
Save the current buffer as a new filename
Exemplo:
:w newfile.txt:q
Quit (close the window)
Exemplo:
:q:wq
Save and quit
Exemplo:
:wq:q!
Quit without saving (force quit)
Exemplo:
:q!:x
Save and quit (only writes if changes were made)
Exemplo:
:x:e filename
Open a file for editing
Exemplo:
:e README.md:sp
Split the window horizontally
Exemplo:
:sp file.txt:vsp
Split the window vertically
Exemplo:
:vsp file.txtCtrl+w+w
Switch focus to the next split window
Exemplo:
Ctrl+w wCtrl+w+h/j/k/l
Move focus to the window in the given direction
Exemplo:
Ctrl+w l:close
Close the current window split
Exemplo:
:close:only
Close all windows except the current one
Exemplo:
:only:bn
Switch to the next buffer
Exemplo:
:bn:bp
Switch to the previous buffer
Exemplo:
:bp:bd
Delete (close) the current buffer
Exemplo:
:bd:ls
List all open buffers
Exemplo:
:ls:b N
Switch to buffer number N
Exemplo:
:b 2:tabnew
Open a new tab
Exemplo:
:tabnew file.txt:tabn
Switch to the next tab
Exemplo:
:tabn:tabp
Switch to the previous tab
Exemplo:
:tabp:tabclose
Close the current tab
Exemplo:
:tabclosegt
Go to the next tab
Exemplo:
gtgT
Go to the previous tab
Exemplo:
gTq{a-z}
Start recording a macro into register {a-z}
Exemplo:
qqq (stop)
Stop recording the current macro
Exemplo:
q@{a-z}
Execute the macro stored in register {a-z}
Exemplo:
@q@@
Repeat the last executed macro
Exemplo:
@@N@{a-z}
Execute macro N times
Exemplo:
5@q:reg
Show the contents of all registers
Exemplo:
:regv then d
Select text in Visual mode then delete it
Exemplo:
vwdv then y
Select text in Visual mode then yank (copy) it
Exemplo:
vwyv then c
Select text in Visual mode then change it
Exemplo:
vwcv then >
Indent selected text to the right
Exemplo:
vip>vip
Select the current paragraph in Visual mode
Exemplo:
vipviw
Select the current word in Visual mode
Exemplo:
viwvis
Select the current sentence in Visual mode
Exemplo:
visV then J
Select lines in Visual Line mode then join them
Exemplo:
VjJ:set number
Show line numbers
Exemplo:
:set number:set nonumber
Hide line numbers
Exemplo:
:set nonumber:syntax on
Enable syntax highlighting
Exemplo:
:syntax on:colorscheme
Change the color scheme
Exemplo:
:colorscheme desert:help {topic}
Open Vim help for a topic
Exemplo:
:help :wm{a-z}
Set a mark at the current cursor position
Exemplo:
ma'{a-z}
Jump to the line of a mark
Exemplo:
'a`{a-z}
Jump to the exact position of a mark
Exemplo:
`a:set paste
Enable paste mode to avoid auto-indent issues
Exemplo:
:set paste:set ignorecase
Make searches case-insensitive
Exemplo:
:set ignorecase:set hlsearch
Highlight all search matches
Exemplo:
:set hlsearchga
Show the ASCII value of the character under the cursor
Exemplo:
gazz
Center the current line on the screen
Exemplo:
zzCtrl+g
Show the current file name and cursor position
Exemplo:
Ctrl+gFerramentas Relacionadas
Ver todas as ferramentasComandos Git Folha de Referência
Folha de referência abrangente de comandos Git. Pesquise mais de 80 comandos Git essenciais com exemplos, descrições e cópia com um clique.
Comandos Docker Folha de Referência
Folha de referência completa de comandos Docker. Pesquise 70+ comandos essenciais com exemplos, descrições e cópia com um clique.
Linux / Bash Folha de Referência de Comandos
Folha de referência completa de comandos Linux e Bash. Pesquise mais de 80 comandos essenciais com exemplos, descrições e cópia em um clique.
Consulta SQL Formatador e Realçador
Formate, embeleze e realce sintaticamente consultas SQL instantaneamente no seu navegador. Gratuito, seguro e sem necessidade de upload.