Guide du cheat sheet
Vim raccourcis a apprendre en premier
Cette page rassemble 60 raccourcis clavier consultables pour Vim dans 6 categories. Commencez par les categories principales, puis imprimez la fiche si vous voulez la garder a portee de main.
- Changez d'onglet OS pour voir les raccourcis Windows, macOS ou Linux.
- Utilisez / pour lancer la recherche immediatement.
- Utilisez le mode comparaison entre plusieurs machines.
- Imprimez ou enregistrez la page en PDF compact.
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
Navigation
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
Aller a la ligne 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
Edition
15 shortcuts
Supprimer character
x
Winx
Macx
Linuxx
Supprimer line
dd
Windd
Macdd
Linuxdd
Supprimer word
dw
Windw
Macdw
Linuxdw
Supprimer to end of line
D
WinD
MacD
LinuxD
Yank (copy) line
yy
Winyy
Macyy
Linuxyy
Yank word
yw
Winyw
Macyw
Linuxyw
Coller 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
Annuler
u
Winu
Macu
Linuxu
Retablir
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
Fichier & Buffers
9 shortcuts
Enregistrer le fichier
: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!
Ouvrir le fichier
: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}
Questions frequentes
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