Useful vi commands
Only record some commonly used commands
Delete
delete one line
dddelete one line from the current cursor
Ddelete all from current cursor
dGdelete whole file
ggdGgg means move cursor to the front
Undo
- Undo last thing you did
u
Search
Search forward
/Search backward
?Repeat last search in the same direction
nRepeat last search in the opposite direction
NSet raw number
set nuReplacing all matching strings
g/search-string/s//replace-string/g