Vim Cheat Sheet - Complete Reference Guide

Essential Vim commands and shortcuts for efficient text editing. Master the powerful Vim editor with this comprehensive reference guide and interactive Vim simulator.

Interactive Vim Simulator

Quick Reference
Navigation
h j k l - Move
w b - Word movement
0 $ - Line start/end
gg G - File start/end
Editing
i a - Insert
o O - New line
dd yy - Delete/Copy
p P - Paste
Reference

Vim Complete Guide

What is Vim?

Vim (Vi IMproved) is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is an improved version of the vi editor distributed with most UNIX systems.

Features of Our Vim Tool

  • Interactive Simulator: Practice Vim commands in real-time
  • Command Reference: Complete guide to Vim commands and shortcuts
  • Mode Explanation: Understand Normal, Insert, and Visual modes
  • Best Practices: Tips for efficient Vim usage
  • Learning Path: Structured approach to mastering Vim
Vim Editor

Complete Vim Reference

Essential Vim commands and shortcuts for efficient text editing. Master the powerful Vim editor with this comprehensive reference guide.

Basic Navigation

h, j, k, lMove left, down, up, right
wMove to next word
bMove to previous word
0Move to beginning of line
$Move to end of line
ggGo to first line
GGo to last line
:nGo to line n
Ctrl+fPage down
Ctrl+bPage up

Modes

iInsert mode at cursor
IInsert at beginning of line
aInsert after cursor
AInsert at end of line
oOpen new line below
OOpen new line above
EscReturn to normal mode
vVisual mode

Editing

xDelete character
ddDelete line
dwDelete word
d$Delete to end of line
d0Delete to beginning of line
yyCopy line
ywCopy word
pPaste after cursor
PPaste before cursor
uUndo

Search and Replace

/patternSearch forward
?patternSearch backward
nNext search result
NPrevious search result
:%s/old/new/gReplace all occurrences
:s/old/new/gReplace in current line
:nohClear search highlighting

File Operations

:wSave file
:qQuit
:wqSave and quit
:q!Quit without saving
:e filenameOpen file
:w filenameSave as
:r filenameRead file into current

Vim Key Features & Benefits

Vim is often called a "programmer's editor," and so useful for programming that many consider it an entire IDE. Key features include:

  • Modal Editing: Efficient text manipulation with different modes
  • Extensive Customization: Configuration files for personalized experience
  • Powerful Search & Replace: Advanced pattern matching and substitution
  • Language Support: Syntax highlighting for hundreds of programming languages
  • Plugin System: Extended functionality through plugins
  • Cross-Platform: Available on virtually every platform

Vim Learning Path

Master Vim with our structured learning approach:

  • Start with Navigation: Learn h, j, k, l for basic movement
  • Master Basic Editing: Practice i, a, o, O for text insertion
  • Learn Copy/Paste: Use yy, dd, p, P for text manipulation
  • Understand Modes: Normal, Insert, and Visual modes
  • Advanced Commands: Search, replace, and file operations
  • Customization: Configure .vimrc for personal preferences