Skip to content
WarWithinMe edited this page Feb 28, 2012 · 11 revisions

Supported Commands

Visual Mode

v V h j k l o O 0 _ ^ $ % | w b e W B E <BackSpace>

c y s x d p u U ~ r C Y S X D

Ex Mode

:w Write
:wq Write and quit
:q Quit

Insert Mode

Ctrl+h Backspace
Ctrl+c Change to normal mode
Ctrl+[ change to normal mode
Ctrl+w Delete a word before
Ctrl+h Delete to the beginning of line

Normal Mode

# Means you can enter a number, e.g. 12l to move right 12 times

/ Search
? Search in reverse direction
: Enter ex mode
n Repeat last search
N Repeat last search, but in reverse
& Repeat last ex command
#h Moves caret left
#j Moves caret down
#k Moves caret up
#l Moves caret right
 i Enters insert mode
 I Enters insert mode at the start of the indentation of current line
 a Enters insert mode after the current character
 A Enters insert mode at the end of line
 o Opens a new line below, auto indents, and enters insert mode
 O Opens a new line above, auto indents, and enters insert mode
 r Enters single replace mode (insert mode with overtype enabled).
 R Enters replace mode (insert mode with overtype enabled).
 0 Move to start of current line
 $ Move to end of current line
 ^ Move to the start of indentation on current line.
#_ The same as ^, but accept count
#g_ Go to none-blank line end
 H Goto first visible line
 M Goto the middle of the screen
 L Goto last visible line
#G Goto last line, or line number (e.g. 12G goes to line 12), 0G means goto last line.
#u undo
#U redo
#J Join this line with the one(s) under it.
#x Delete character under caret, and put the deleted chars into clipboard.
#X Delete character before caret (backspace), and put the deleted chars into clipboard
#p Paste text after the caret
#P Paste text
#w Moves to the start of the next word
#b Moves (back) to the start of the current (or previous) word.
#e Moves to the end of the current (or next) word.
#WBE Similar to wbe commands, but words are separated by white space, so ABC+X(Y) is considered a single word.
gg Goto first line in file
zz Scroll view so current line is in the middle
zt Scroll view so current line is at the top
zb Scroll view so current line is at the bottom
#y#y Yank whole lines, acts like #Y
#d#d Yank and delete who lines
#c#c Yank and delete who lines, then enter insert mode
Ctrl+u Half screen up
Ctrl+d Half screen down
Ctrl+f One page forward
Ctrl+b One page backward
#| Go to column
 % Go to match brace
#- Go to none-blank of the previous line
#+ Go to none-blank of the next line
#Enter Go to none-blank of the next line
#fx Find 'x' in current line
#Fx Find 'x' in current line, but backward
#tx Like #fx, but stop right before 'x'
#Tx Like #Fx, but stop right after 'x'
#; Repeat last find motion
#, Repeat last find motion, but in reverse

Motion command :

Supported operaters:
ydc

Supported motions:
w b e W B E h j k l G gg g_ & ^ _ % $ H M L fx Fx tx Tx ; ,

Supported text objects:
iw iW ib iB i{ i} i[ i] i( i) i< i> aw aW ab aB a{ a} a[ a] a( a) a< a>

Other details:

v Used to force characterwise

V Used to force linewise

Example usage:

diw to delete a word.

yVe to yank a line.