Using Vi
You can startvieither by simply typingviat the command prompt, or you can specify the file you want to edit withvi**filename**. If the file does not already exist,it will be created for you.
viconsists of twooperating modes,command_mode and_edit_mode. When you first enter**_vi**you will be in command mode. Command mode allows you to search for text, move around the file, and issue commands for saving, save-as, and exiting the editor. Edit mode is where you actually input and change text.
In order to switch to edit mode, type eithera(for append),i(for insert), or one of the other insert options listed on the next page. When you do this you will see "--Insert--" appear at the bottom of your screen. You can now input text. When you want to exit the edit mode and return to command mode, hit the escape key.
You can use the arrow keys to move around the file in command mode. In addition, there are a number of other navigation keys described below.
If you lose track of which mode you are in, hit the escape key twice. You should hear your computer beep and you will know that you are in command mode.
In current Linux distributions,vi_is usually a link to**_vim(vi improved). This newer versionofvicomes with a nice online tutorial. It is worth your time. Try typingvimtutor**at a command prompt.