a |
enter insert mode after cursor position |
b |
moves the cursor back to the previous start of a word |
cw |
change the word the cursor is on by deleting it and entering
insert mode |
D |
delete rest of line after cursor position |
dd |
delete the line the cursor is on |
dw |
delete the word the cursor is on |
e |
moves the cursor to the next end of a word |
i |
enter insert mode before cursor position |
J |
join the line the cursor is on and the following line
together |
o |
open a new line, position the cursor at the start of it and
enter insert mode |
w |
moves the cursor to the start of the next word |
x |
delete the character at the cursor |
ZZ |
write all changes to the file, and quit Vi |
^ |
moves the cursor to the beginning of the current line |
C |
moves the cursor to the end of the current line |
/word |
search forward for the string word |
?word |
search backwards for the string word |
ctrl-D |
move down the file half a screen |
ctrl-U |
move back up the file half a screen |