Guida al cheat sheet
Vim scorciatoie da imparare per prime
Questa pagina raccoglie 60 scorciatoie da tastiera cercabili per Vim in 6 categorie. Parti dalle categorie principali, poi stampa il cheat sheet quando vuoi tenerlo a portata di mano.
- Cambia scheda OS per vedere scorciatoie Windows, macOS o Linux.
- Usa / per passare subito alla ricerca.
- Usa la modalita confronto quando lavori su macchine diverse.
- Stampa o salva la pagina come cheat sheet PDF compatto.
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
Navigazione
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
Vai alla riga 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
Modifica
15 shortcuts
Elimina character
x
Winx
Macx
Linuxx
Elimina line
dd
Windd
Macdd
Linuxdd
Elimina word
dw
Windw
Macdw
Linuxdw
Elimina to end of line
D
WinD
MacD
LinuxD
Yank (copy) line
yy
Winyy
Macyy
Linuxyy
Yank word
yw
Winyw
Macyw
Linuxyw
Incolla 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
Annulla
u
Winu
Macu
Linuxu
Ripeti
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
File & Buffers
9 shortcuts
Salva file
: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!
Apri file
: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}
Domande frequenti
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