vi for nano lovers #

For the very occasional vi / vim user who just wants to edit a config file on a remote server, thank you very much:
Switch to insert mode (from which you can enter text)
i

Switch to command mode (from which you issue the commands below)
ESC

Quit without saving changes
:q!

Save (write) the file
:w

Save (write) the file and quit vi
:wq

Delete characters under and after cursor (like Del key in most apps)
x

Delete characters before the cursor (like Backspace key in most apps)
X

Find previous
?

Find next
/

Cursor up, down, left, right (arrow keys may also work)
k, j, h, l

/nix | Mar 31, 2009


Subscribe or visit the archives.