Vim Cheat Sheet

Vim editor commands reference guide

Vim Cheat Sheet

Quick reference guide for Vim editor commands. Click the copy button to copy any command.

119
Total Commands
119
Filtered Results

Modes

CommandCopyDescription
iEnter insert mode (before cursor)
aEnter insert mode (after cursor)
IInsert at beginning of line
AInsert at end of line
oOpen new line below
OOpen new line above
EscReturn to normal mode
vEnter visual mode (character)
VEnter visual mode (line)
Ctrl+vEnter visual mode (block)
:Enter command mode

Navigation

CommandCopyDescription
hMove left
jMove down
kMove up
lMove right
wMove to next word
bMove to previous word
eMove to end of word
0Move to start of line
$Move to end of line
^Move to first non-blank character
ggGo to first line
GGo to last line
5GGo to line 5
Ctrl+dScroll down half page
Ctrl+uScroll up half page
Ctrl+fScroll down full page
Ctrl+bScroll up full page
%Jump to matching bracket

Editing

CommandCopyDescription
xDelete character under cursor
XDelete character before cursor
ddDelete current line
DDelete from cursor to end of line
dwDelete word
d$Delete to end of line
d0Delete to beginning of line
yyYank (copy) current line
ywYank word
y$Yank to end of line
pPaste after cursor
PPaste before cursor
uUndo
Ctrl+rRedo
rReplace single character
REnter replace mode
cwChange word
ccChange entire line
CChange to end of line
~Toggle case of character
.Repeat last command

Search and Replace

CommandCopyDescription
/patternSearch forward for pattern
?patternSearch backward for pattern
nRepeat search forward
NRepeat search backward
:s/old/newReplace first occurrence in line
:s/old/new/gReplace all in line
:%s/old/new/gReplace all in file
:%s/old/new/gcReplace all with confirmation
*Search for word under cursor
#Search backward for word under cursor

File Operations

CommandCopyDescription
:wSave file
:w filenameSave as filename
:qQuit
:q!Quit without saving
:wqSave and quit
:xSave and quit (same as :wq)
ZZSave and quit (normal mode)
ZQQuit without saving (normal mode)
:e filenameOpen file
:r filenameInsert file contents
:saveas filenameSave as and switch to file

Buffers

CommandCopyDescription
:bnNext buffer
:bpPrevious buffer
:bdDelete buffer
:lsList all buffers
:b5Switch to buffer 5

Windows

CommandCopyDescription
:splitSplit window horizontally
:vsplitSplit window vertically
Ctrl+w sSplit window horizontally
Ctrl+w vSplit window vertically
Ctrl+w wSwitch between windows
Ctrl+w hMove to left window
Ctrl+w jMove to window below
Ctrl+w kMove to window above
Ctrl+w lMove to right window
Ctrl+w qClose current window
Ctrl+w =Make all windows equal size

Tabs

CommandCopyDescription
:tabnewCreate new tab
:tabnew filenameOpen file in new tab
gtGo to next tab
gTGo to previous tab
:tabcClose current tab
:taboClose all other tabs

Visual Mode

CommandCopyDescription
>Indent selected text
<Unindent selected text
dDelete selected text
yYank selected text
cChange selected text

Marks

CommandCopyDescription
maSet mark a
'aJump to mark a
:marksList all marks

Macros

CommandCopyDescription
qaRecord macro in register a
qStop recording macro
@aExecute macro a
@@Repeat last macro

Text Objects

CommandCopyDescription
diwDelete inner word
dawDelete a word (with space)
di"Delete inside quotes
da"Delete around quotes
dipDelete inner paragraph
ci{Change inside curly braces

Other Useful Commands

CommandCopyDescription
:set numberShow line numbers
:set nonumberHide line numbers
:set pasteEnable paste mode
:set nopasteDisable paste mode
:syntax onEnable syntax highlighting
:!commandExecute shell command
JJoin line below to current line
gJJoin without adding space

All operations are performed locally in your browser. No data is sent to any server.

About Vim Cheat Sheet

This section will contain detailed, SEO-friendly content about the Vim Cheat Sheet.

In the future, this content will be managed through a headless CMS, allowing you to:

  • Add detailed explanations about how to use this tool
  • Include examples and use cases
  • Provide tips and best practices
  • Add FAQs and troubleshooting guides
  • Update content without touching the code

How to Use

Step-by-step instructions for using the Vim Cheat Sheet will appear here. This content will be fully customizable through the admin panel.

Features

Key features and benefits of this tool will be listed here. All content is editable via the CMS.