Profile picture
Sidharth R
  • Home
  • Posts
  • Journal
  • Home
  • Posts
  • Journal
  • Search

Ultimate Vi Shortcuts Cheat Sheet

Updated: 07 Apr 2026 ⚬ Page views: loading...

Big picture of Vim commands

  1. Normal mode (default)
   ├── Navigation (h, j, k, l, G)
   ├── Editing (d, c, x)
   ├── Insert triggers (i, a, o, O, A)
  1. Insert mode → typing text

  2. Visual mode → selecting text

  3. Command mode (:) → commands like :w, :q, :10,20d

Navigation (movement commands)

G
  • G → go to last line

2. Editing / insertion commands

o, O, A : These change the file and switch you to insert mode.

CommandMeaning
oopen line below
Oopen line above
Aappend at end of line
Tip

G o - create a new line below last line and start typing

Here,

  • Shift + G → go to last line
  • o → open new line + switch to insert mode

Delete

Delete from line X to line Y

:X,Yd

Example:

:10,20d

Show line numbers:

:set number

Delete from current line → line 20

:.,20d

Here . = current line

Delete from current line → next 10 lines

d10d

Deletes current + next 10 lines

Delete with Visual mode

  1. Press:
Shift + V
  1. Use ↑ ↓ to select lines
  2. Press:
d

Delete entire file content

:%d

Nerdsid.com

Links
  • Home
  • Contact
  • About
  • Posts
  • Journal
  • Quotes
  • Notes
  • Style guide
© 2026 Sidharth R.
All content on this website is licensed under CC BY-NC-SA 4.0.