Vi cheatsheet
Sun Feb 24, 2013 · 99 words

Navigation

left/up/down/right

hjkl

move to the start of the file

gg

move to the end of file

Shift+g

move to the start of the next word

w

move to the end of the next word

Shift+e

move to the end of the line

Shift+$

move to the start of the line

0

Actions

Switch to visual mode

Esc

Text Edit

Start Editing

i

Delete line

dd

Commands

show vi documentation

help 

will search for occurences of “word” in the document

/word

Save and exit

!wq

Replace pattern with string according to flags (:s/pattern/string/flags where flags one of g,c)

s

back · articles · who is this? · main