contents
vimtext-editorcheat-sheetkeyboard-shortcutslinux
Abstraction: Vim command reference for navigation, editing, and search/replace
Key points:
- Navigation:
h/j/k/lfor character/line movement;0/^/$for line start/first-non-whitespace/end;H/M/Lfor screen top/middle/bottom;:nto jump to line n - Insert modes:
ibefore cursor,aafter,onew line below,Oabove,Roverwrite mode; ESC returns to command mode - Visual mode:
vfor character selection,Vfor line selection; operations include yank (y), delete (d), indent (>/<), case toggle (~) - Undo/redo:
uundo last action,Uundo all changes on current line,Ctrl+rredo - Search:
/patternforward search,n/Nnext/previous match - Replace syntax:
:%s/foo/bar/greplaces all occurrences in file; flags includeg(all on line),i(ignore case),c(confirm each substitution)
Connections: Vim · Vim · Text Editor