Professional Documents
Culture Documents
VI Help Sheet
Inserting Text
Other
Insertion Mode
u
Undo last change
vi <filename>
vi -r <filename>
Edit filename
Edit last version of filename after crash
vi + n <filename>
vi + <filename>
vi +/str <filename>
:w
Save
:r <file>
:x
:q
:q!
Cursor Navigation
Deleting Text
h or
Cursor left
j or
Cursor down
k or
Cursor up
l or
Cursor right
dd or :d
Next word
ndw
ndb
Start of word
ndd
:x,yd
End of word
:r <file>
Back a sentence
Forward a sentence
Back a paragraph
Searching
Forward a paragraph
/string
Beginning of line
?string
Go to next match
1G
Start of file
Go to previous match
End of file
:set ic
:n
:set noic
Case-sensitive searching
f<char>
Forward to char
:set nu
F<char>
Back to char
:x,yg/str
Top of screen
Middle of screen
Bottom of screen
Matching bracket
gg
Start of document
Replacing
Join lines
nJ
Join next n lines
.
Repeat last command
U
Undo all changes to line
:N
Open split screen
v
Visual mode
ctrl + c
Escape insert mode
:r <file>
Confirm replaces
&