Linux & Terminal · Cheatsheet
Vim Editor Cheatsheet
Vim modes, movement, editing, copy and paste, search, replacement, and file commands.
64 commands 8 sections
No entry matches that filter.
-
iEnter Insert mode (before cursor) -
aEnter Insert mode (after cursor) -
IInsert at beginning of line -
AInsert at end of line -
oOpen new line below and enter Insert mode -
OOpen new line above and enter Insert mode -
vEnter Visual mode (character selection) -
VEnter Visual Line mode (line selection) -
Ctrl+vEnter Visual Block mode (column selection) -
EscReturn to Normal mode
-
xDelete character under cursor -
ddDelete (cut) entire line -
dwDelete to end of word -
d$Delete to end of line -
DDelete to end of line (same as d$) -
ccChange entire line (delete and enter Insert mode) -
cwChange word -
CChange to end of line -
r<char>Replace single character -
REnter Replace mode (overwrite text) -
JJoin current line with next line -
~Toggle case of character
-
yyYank (copy) entire line -
ywYank word -
y$Yank to end of line -
pPaste after cursor -
PPaste before cursor -
"+yYank to system clipboard -
"+pPaste from system clipboard
-
/<pattern>Search forward for pattern -
?<pattern>Search backward for pattern -
nRepeat search in same direction -
NRepeat search in opposite direction -
*Search for word under cursor (forward) -
#Search for word under cursor (backward) -
:%s/old/new/gReplace all in file -
:%s/old/new/gcReplace all with confirmation -
:s/old/new/gReplace all in current line
-
uUndo last change -
Ctrl+rRedo last undone change -
.Repeat last command
-
:wSave file -
:w <filename>Save as new file -
:qQuit (fails if unsaved changes) -
:q!Quit without saving -
:wqSave and quit -
:xSave and quit (only writes if changed) -
ZZSave and quit (Normal mode) -
:e <file>Open a file -
:bn / :bpNext / previous buffer
-
https://vimhelp.org/quickref.txt.htmlVim reference: modes, movement, editing, search, and file commands.
Related cheatsheets
Guides that use these commands
Tools for this work
- UML Diagram EditorCreate UML diagrams with a live PlantUML editor. Write code and instantly preview sequence, class, activity, state, and component diagrams.
- Spreadsheet EditorEdit CSV and Excel files directly in your browser without uploading to any server.
- Photo EditorCreate stunning images with text, stickers, and filters. No watermark!