Beruflich Dokumente
Kultur Dokumente
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 one character 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]
ex Mode
Navigation
Go to line 1 Go to line 10 Go to end of file Go back one page Go forward one page
x dd dw db d$ d^ dG p P u U
R ~ rc cc cw cb c$ c^ cG
yy yw yb y$ y^ yG
Delete current character Delete or copy current line Delete or 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 buffer contents before the cursor Undo last change Undo all changes made in current line
Replacing Text
Enter replace mode to replace text Change case of current character Replace current character with c Replace the entire current line Replace current word Replace back to beginning of current word Replace to end of line Replace to beginning of line Replace to end of file
Miscellaneous
[esc] [esc] [esc] [esc]
Note: Most vi commands can be preceded by a number. eg: 10dd deletes 10 lines