First page Back Continue Last page Overview Graphics
vi commands
:wq (write changes to file and quit)
:q! (quit without saving changes)
:set nu (sets numbering of lines on)
yy (yank/copy the current line)
p (paste the copied line(s)) right below the cursor
Anything potentially harmful (e.g. quitting without saving changes, writing to a read-only file), has to be forced with an exclamation mark (!)
Notes:
For more info on vi, look up its reference card:
http://www.google.com/search?q=vi%20reference%20card