Guia del cheat sheet
Vim atajos que conviene aprender primero
Esta pagina reune 60 atajos de teclado buscables para Vim en 6 categorias. Empieza por las categorias principales y despues imprime la ficha si quieres tenerla a mano.
- Cambia de pestana OS para ver atajos de Windows, macOS o Linux.
- Usa / para ir directamente a la busqueda.
- Usa el modo comparar cuando trabajes entre equipos.
- Imprime o guarda la pagina como PDF compacto.
Modes
11 shortcuts
Enter Normal mode
Esc
WinEsc
MacEsc
LinuxEsc
Enter Insert mode
i
Wini
Maci
Linuxi
Insert at end of line
A
WinA
MacA
LinuxA
Insert on new line below
o
Wino
Maco
Linuxo
Insert on new line above
O
WinO
MacO
LinuxO
Enter Visual mode
v
Winv
Macv
Linuxv
Enter Visual Line mode
V
WinV
MacV
LinuxV
Enter Visual Block mode
Ctrl+V
WinCtrl+V
MacCtrl+V
LinuxCtrl+V
Enter Command-line mode
:
Win:
Mac:
Linux:
Replace single character
r
Winr
Macr
Linuxr
Replace mode (overwrite)
R
WinR
MacR
LinuxR
Navegacion
12 shortcuts
Move left/down/up/right
h/j/k/l
Winh/j/k/l
Mach/j/k/l
Linuxh/j/k/l
Next / previous word
w/b
Winw/b
Macw/b
Linuxw/b
End of word
e
Wine
Mace
Linuxe
Start of line (non-blank)
^
Win^
Mac^
Linux^
End of line
$
Win$
Mac$
Linux$
First line of file
gg
Wingg
Macgg
Linuxgg
Last line of file
G
WinG
MacG
LinuxG
Ir a linea N
:NorNgg
Win:NorNgg
Mac:NorNgg
Linux:NorNgg
Half page down/up
Ctrl+D/Ctrl+U
WinCtrl+D/Ctrl+U
MacCtrl+D/Ctrl+U
LinuxCtrl+D/Ctrl+U
Jump to matching bracket
%
Win%
Mac%
Linux%
Jump to next/prev occurrence of char
f{char}/F{char}
Winf{char}/F{char}
Macf{char}/F{char}
Linuxf{char}/F{char}
Center view on cursor
zz
Winzz
Maczz
Linuxzz
Edicion
15 shortcuts
Eliminar character
x
Winx
Macx
Linuxx
Eliminar line
dd
Windd
Macdd
Linuxdd
Eliminar word
dw
Windw
Macdw
Linuxdw
Eliminar to end of line
D
WinD
MacD
LinuxD
Yank (copy) line
yy
Winyy
Macyy
Linuxyy
Yank word
yw
Winyw
Macyw
Linuxyw
Pegar after / before cursor
p/P
Winp/P
Macp/P
Linuxp/P
Change word
cw
Wincw
Maccw
Linuxcw
Change to end of line
C
WinC
MacC
LinuxC
Change entire line
cc
Wincc
Maccc
Linuxcc
Deshacer
u
Winu
Macu
Linuxu
Rehacer
Ctrl+R
WinCtrl+R
MacCtrl+R
LinuxCtrl+R
Repeat last change
.
Win.
Mac.
Linux.
Indent / unindent line
>>/<<
Win>>/<<
Mac>>/<<
Linux>>/<<
Auto-indent selection
=G(fromtop)
Win=G(fromtop)
Mac=G(fromtop)
Linux=G(fromtop)
Search & Replace
8 shortcuts
Search forward
/{pattern}
Win/{pattern}
Mac/{pattern}
Linux/{pattern}
Search backward
?{pattern}
Win?{pattern}
Mac?{pattern}
Linux?{pattern}
Next / previous match
n/N
Winn/N
Macn/N
Linuxn/N
Search word under cursor
*/#
Win*/#
Mac*/#
Linux*/#
Replace in line
:s/old/new/
Win:s/old/new/
Mac:s/old/new/
Linux:s/old/new/
Replace all in file
:%s/old/new/g
Win:%s/old/new/g
Mac:%s/old/new/g
Linux:%s/old/new/g
Replace with confirmation
:%s/old/new/gc
Win:%s/old/new/gc
Mac:%s/old/new/gc
Linux:%s/old/new/gc
Clear search highlight
:noh
Win:noh
Mac:noh
Linux:noh
Archivo & Buffers
9 shortcuts
Guardar archivo
:w
Win:w
Mac:w
Linux:w
Save and quit
:wq
Win:wq
Mac:wq
Linux:wq
Quit without saving
:q!
Win:q!
Mac:q!
Linux:q!
Abrir archivo
:e{file}
Win:e{file}
Mac:e{file}
Linux:e{file}
List buffers
:ls
Win:ls
Mac:ls
Linux:ls
Next / previous buffer
:bn/:bp
Win:bn/:bp
Mac:bn/:bp
Linux:bn/:bp
Split horizontally
:sp
Win:sp
Mac:sp
Linux:sp
Split vertically
:vsp
Win:vsp
Mac:vsp
Linux:vsp
Navigate splits
Ctrl+Whjkl
WinCtrl+Whjkl
MacCtrl+Whjkl
LinuxCtrl+Whjkl
Macros
5 shortcuts
Record macro into register
q{letter}
Winq{letter}
Macq{letter}
Linuxq{letter}
Stop recording
q
Winq
Macq
Linuxq
Play macro
@{letter}
Win@{letter}
Mac@{letter}
Linux@{letter}
Repeat last macro
@@
Win@@
Mac@@
Linux@@
Run macro N times
N@{letter}
WinN@{letter}
MacN@{letter}
LinuxN@{letter}
Preguntas frecuentes
What is the fastest way to find Vim shortcuts on this page?
Use the search box or press /, then type an action such as enter normal mode.
Can I print this Vim shortcut cheat sheet?
Yes. Use the Print / PDF button or your browser print command to save a compact cheat sheet.
Does this page include Windows and Mac shortcuts for Vim?
Yes. Use the OS tabs to switch between Windows and macOS shortcuts. For example, Enter Normal mode is Esc on Windows and Esc on macOS where available.
Advertisement