Carton
Opening Files
$ vi $ vi filename [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] :wq! :w! :q! :w newfile h l k j b w ^ $Opening an empty document Opening a new or existing file Save changes and quit Save without quitting Quit without saving Save as a different file name Go Go Go Go Go Go Go Go left one character right onecharacter up one line down one line back one word forward one word to the beginning of the line to the end of the line
Modes
Input Mode [O] [o] [I] [i] [A] [a] [esc] [:] [esc]
Saving and ClosingCommand Mode [R] [r] [esc] Replace Mode
ex Mode
Navigation
Inserting & Appending
[esc] [esc] [esc] [esc] [esc] [esc] o O i I a A Open a new line below the cursor Open a new line above thecursor Insert to the left of the cursor Insert at the beginning of the line Append to the right of the cursor Append at the end of the line Delete current character Delete or copy current line Deleteor copy to word Delete or copy to beginning of word Delete or copy to end of line Delete or copy to beginning of line Delete or copy to end of file Paste buffer contents after the cursor Paste buffercontents before the cursor Undo last change Undo all changes made in current line
Cutting, Copying, & Pasting
[esc] x [esc] dd [esc] dw [esc] db [esc] d$ [esc] d^ [esc] dG [esc] p [esc] P [esc] u[esc] U [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] R ~ rc cc cw cb c$ c^ cG [esc] [esc] [esc] [esc] [esc] [esc] yy yw yb y$ y^ yG
[esc] 1G [esc] 10G [esc] G [control] b [control] fGo to line 1 Go to line 10 Go to end of file Go back one page Go forward one page
Searching & Replacing
[esc] /oldtext Search down for a string [esc] ?oldtext Search up from EOF for a string [esc]cw Change the current word [esc] n Search again, in same direction [esc] N Search again, in reverse direction [esc] . Repeat previous replace operation [esc]:1,$s/oldtext/newtext/g Globally replace...
Regístrate para leer el documento completo.