VI
[top] Modes/Commands
Modes:
insert mode
command mode
ex mode
Commands:
k - up
j - down
h - left
l - right
^ - beginning of line
$ - end of line
1G OR :0 - goto start of file
G OR :$ - goto end of file
nG - goto line #
a - append here
A - append at end of line
J - join 2 lines
i - insert here
I - insert at start of line
R - overstrike
o - open line below current line
O - open line above current line
p - put yanked line below current line
u - undeo last change
U - undo all changes
x - delete character
yy - yank line
:%s/str1/str2/g - substitute string str1 to string str2 globally
/pattern - search pattern
n - repeat previous search
N - repeat previous search in reverse
n1,n2tn3 - copy lines from line n1-n2 and put after line n3
n1,n2mn3 - move lines from line n1-n2 and put after line n3
:q - quit
:q! - quit w/o save
:x OR :wq - save & quit
[top] Environmental Setup
Files:
~/.exrc
~/.vimrc
Settings:
set number - sets numbering
Cheatsheets






