Vim Cheatsheet - Essential Vim Commands

Master Vim with this handy cheatsheet. Learn essential commands for navigation, editing, sorting, and more. Improve your workflow with quick tips and tricks.

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

  1. Go to first line in a file in vim?
  2. Vim Cheat Sheet
  3. sort rows in 'VI' editor
  4. What's a quick way to comment/uncomment lines in Vim?
  5. 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.