100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

Vim Keyboard Shortcuts Cheat Sheet

Vim Keyboard Shortcuts Cheat Sheet

A reference for Vim modal editing covering movement, editing commands, search and replace, and buffer management.

2 PagesIntermediateJan 28, 2026

Modes

Vim's core editing modes and how to switch between them.

  • Normal mode- Default mode for navigation and commands; press `Esc` to return to it
  • Insert mode- `i` insert before cursor, `a` after cursor, `o` open new line below
  • Visual mode- `v` character-wise, `V` line-wise, `Ctrl-v` block-wise selection
  • Command-line mode- `:` enters commands like `:w`, `:q`, `:%s/foo/bar/g`
  • Replace mode- `R` overtypes existing characters instead of inserting

Movement

Cursor navigation commands in normal mode.

bash
h j k l        # left, down, up, rightw / b          # next word start / previous word starte              # end of word0 / $          # start / end of line^              # first non-blank charactergg / G         # top / bottom of file{n}G           # go to line n%              # jump to matching bracketCtrl-d / Ctrl-u # half page down / up

Editing

Common editing commands and operators.

bash
x              # delete character under cursordd             # delete (cut) current lineyy             # yank (copy) current linep / P          # paste after / before cursoru / Ctrl-r     # undo / redocw             # change to end of wordd$             # delete to end of line>> / <<        # indent / unindent line.              # repeat last change

Search & Replace

Finding and substituting text.

bash
/pattern       # search forward?pattern       # search backwardn / N          # repeat search same / opposite direction:%s/old/new/g  # replace all occurrences in file:%s/old/new/gc # replace with confirmation*              # search word under cursor forward

Files & Buffers

Saving, quitting, and managing multiple files.

  • :w- Write (save) the current file
  • :q / :q!- Quit / quit without saving
  • :wq or :x- Save and quit
  • :e filename- Open another file for editing
  • :bn / :bp- Switch to next / previous buffer
  • :sp / :vsp- Split window horizontally / vertically
Pro Tip

Combine an operator with a text object for precise edits, e.g. `di"` deletes inside quotes and `ci(` changes inside parentheses — far faster than manually selecting text.

Was this cheat sheet helpful?

Explore Topics

#VimKeyboardShortcuts#VimKeyboardShortcutsCheatSheet#ToolsOthers#Intermediate#Modes#Movement#Editing#SearchReplace#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech

Professional Web Designing Services

  • Responsive Websites
  • E-commerce Solutions
  • SEO Friendly Design
  • Fast & Secure
  • Support & Maintenance
Get a Free Quote

Share this Cheat Sheet