The following vi commands are very common and should help you to speed up your coding: thekey will always put into the command mode. COMMAND FUNCTION ------- -------- dd deletes line that the cursor is on #dd deletes # lines on and below the cursor x deletes char at the cursor location #x deletes # chars startring at the cursor location D deletes everything from the cursor to end of line p puts whatever was just deleted (any commands above) either on the line below the cursor (for dd and #dd) or after the cursor on same line (for x or #x of D) u undoes the last command r replaces the character at the cursor with the next character entered cw changes word at cursor to whatever you type after cw dw deletes word begining at cursor location #dw deletes # words begining at cursor location . performs last command yy copies (yanks) entire line of cursor into a buffer #yy copies # lines at cursor location into a buffer p places yanked line(s) from buffer to location of cursor 0 places cursor at begining of line $ places cursor at end of current line / searches from cursor for any occurrance of and places cursor at that location (if found). n takes you to the next location of if found :r inserts entire file specified by to file at current cursor location. :w saves any changes to a file :q quits vi program :wq saves changes and quits :q! quits vi and does not save any changes made (explicitly)