Vi Reference Card
From Nocrashwiki
Open a file: vi filename Insert text before current character: i Insert after character: a Insert at end of line: A Insert at beggingin of line: I Stop inserting text: Esc Delete a line: Esc dd Delete a character: Esc x Copy a line: yy Paste a line: p Replace a word: Esc cw type new word then Esc Replace a character: Esc r new character Search for a word: Esc /word Enter UNDO: Esc u REDO: Esc :redo Do last command again: Esc . Save a file: Esc :w Quit vi: Esc :q Quit without saving Esc :q! Save and quit: Esc :wq