Vi

Navigation

CommandDescription
GGo to the last line in the file
:0Go to the first line in the file
:nGo to the nth line in the file
0Go to the beginning of the line
$Go to the end of the line
wGo forward to the next white space or punctuation
WGo forward to the next white space
bGo back to the next white space or punctuation
BGo back to the next white space
%Go to the matching {} or ()

Editing

CommandDescription
ddDelete the current line
dwDelete the current word
dWDelete the everything until the next space
xDelete the current character
.Repeat the last command
JRemove the carriage return at the end of the current line
~Toggle the case of the current character