Difference between revisions of "Vi Reference Card"
From Nocrashwiki
(Created page with "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:...") |
|||
Line 1: | Line 1: | ||
− | Open a file: vi filename | + | <pre>Open a file: vi filename |
Insert text before current character: i | Insert text before current character: i | ||
Insert after character: a | Insert after character: a | ||
Line 19: | Line 19: | ||
Quit without saving Esc :q! | Quit without saving Esc :q! | ||
Save and quit: Esc :wq | Save and quit: Esc :wq | ||
+ | </pre> |
Latest revision as of 21:03, 8 November 2017
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