i - *Goes to insert mode, and everything you type inserts to the *left* of the cursor.
a - Goes into edit mode, and everything you type starts off to the *right* of the cursor.
o - Inserts a blank line *after* the line you're on, and leave you in edit mode
on the new line.
O - Same as 'o', except the new line appears *above* the line your cursor is on.
x - *Deletes the character under your cursor, and everything to the right shifts to the left.
X - Deletes the character *to the left* of your cursor ( like backspace )
r - Replaces the character under your cursor with the next thing you type. So, if you put
your cursor on a 'g', then you type "rs" the 'g' will now be an 's' and you will be back
in command mode.
R - Overwrite mode.
J - Joins the line after the line your cursor is on, to the end of the line your cursor is on.
:w - *Writes the file.
:q - *Quits w/o saving ( note: you might need to type :q! if you made changes, b/c vim won't
let you exit unless you save, or you force the exit )
:wq - Write and Quit.
:x - Same as :wq ( writes and quits )
:e file - Opens 'file' for editing
:!command - Runs 'command' at a shell prompt. When the command finishes, you are returned to
your vim session ( might need to press enter first )
u - Undo the last command
. - Redo the last command
A - Append to the *end* of the current line.
yy - Yank the current line ( eg copy from copy/paste idea )
- Note: You can specify more than one line, by typing a number between the 'y's. ie,
y5y - yanks 5 lines
y23456y - yanks 23456 lines
p - Pastes the last chunk of information stored in your yank buffer to the file, *after* the
current line your cursor is on, leaving you in command mode.
P - Like 'p', except the pasted information goes *above* the current line your cursor is on.
dd - *Delete the line under the cursor
Same as yy, you can specify to delete more than one line, as:
d10d - deletes 10 lines, starting from the line your cursor is on.
ctrl-g - Gives you status information on the file - what line you're on, how many lines total,
etc.
ctrl-f - Jump forward one page
ctrl-b - Jump backward one page