Super super short vim/vi guide 1. vim/vi has two modes: command mode (you execute commands like find, replace, save file) and insert mode (you type text). 2. When you start vim it is in command mode. You can switch to insert mode by pressing i. You can recognize you are in insert mode as you will see -- INSERT -- at the bottom of the screen. You can switch back to command mode by pressing the Esc key. 3. In insert mode you can use the enter key to add lines, and use arrow keys for navigation. 4. In command mode you can use j to move down, k to move up, h to move left, and l to move right. 5. To execute a command (e.g., saving file), change to command mode (Esc), type a colon (this will move you to the bottom of th screen) and the prompt will be next to the colon. After the colon you can type different commands: a. Typing w after colon will save the file. b. Typing wq after the colon will save the file and exit vim. c. Typing a number takes you to that line in the file. d. Typing q! will exit vim without saving the file. e. Typing r followed by a file name will include that file in the current file wherever the cursor is located. f. Type $ will take you to the last line in the file. g. Type num and that will tell you the line number where the cursor is positioned. 6. Add line - You can add a line after the line the cursor is positioned by using Esc and letter o. 7. Remove line - You can remove a line by using Esc and pressing the d character twice. 8. Remove a character - Place the cursor over the character and use Esc and x to remove the character. 9. Undo operation - You can undo an operation by using Esc and pressing the u character. 10. End of a line - You can move the cursor to the end of the line by using Esc, and $ 11. Beginning of a line - You can move the cursor to beginning of a line by using Esc and ^ 12. How to copy lines - You can copy several lines to another section of a file by: a. Esc followed by number of lines to copy and typing the y character twice (you will see at the bottom a message with "lines yanked") b. Move the cursor to where you want to copy the lines. c. Press character p to copy the lines. For other operations, check any online vim source. The above is enough for most editing and what I use 99% of the time. :) By the way, the following site can be fun and help you learn vim: http://www.vim-adventures.com/ Nelson