Vim Cheatsheet
VIM Cheat Sheet
Go to the first line
gg
:1
1G
1gg
Cursor movement
H
- Move to top of screen
M
- Move to middle of screen
L
- Move to bottom of screen
Editing
J
- join line below
cc
- replace entire line
C
- replace to end of line
c$
- replace to end of line
u
- undo
Sorting
Sort rows.
:%!sort
Multi-line Select
Shift + V
then either k
or j
References
- Go to first line in a file in vim?
- Vim Cheat Sheet
- sort rows in 'VI' editor
- What's a quick way to comment/uncomment lines in Vim?
- How To Comment Out Multiple Lines At Once In Vim Editor
This Vim cheatsheet provides a quick reference for essential commands. For more advanced techniques and a deeper understanding of Vim's capabilities, refer to the official Vim documentation and online resources.