Quick VI
***************************************************************************************************
          vi is a very powerful editing tool that may be used for many				  | 
          purposes in our department. The most popular usage is for editing			  |
          fortran programs, which you will be writing for research purposes. 			  |
          The most difficult aspect of vi is learning the commands becuase			  |
          they are much different than anything you have ever done. Once you 			  |
          learn it though, it becomes very nice to use. Lets do it then...			  |
***************************************************************************************************
												  |
												  |
#1. The first thing you should do is open up another Mozilla window and 			  |
    go to the following to use as a guide:							  |
												  |
| www.onlineitdegree.net/vi-editor/
					 							  |	
												  |
												  |
    This can easily be done by highlighting the site and pasting into an empty URL box.		  |	
    Then come back to this window! 							   	  |
												  |
												  |
---------------------------------------------------------------------------------------------------
												  |
#2. The next step is to open up a new terminal window by clicking on its icon below. We		  |
    will now copy the exercise portion of the workshop into your directory.			  |
 												  |	
												  |
---------------------------------------------------------------------------------------------------	
												  |	
										                  |
#3. copy the file into your directory:								  |

    %cp ~gcm/vi_exercise.txt vi_exercise.txt
 	 	        									  |
    the document exercise.txt will be stored in your home directory.				  |
												  |
												  |
---------------------------------------------------------------------------------------------------
												  |
												  |	
												  |
#4. To edit this document, type:   						 	   	  |
   												  |
    %vi vi_exercise.txt										  |
												  |
    the vi window will pop up with the text in it! This is the practice area for the 		  |
    following.          									  |
												  |
												  |	
---------------------------------------------------------------------------------------------------
											          |
												  |
#5. There are two modes of vi:									  |
												  |
	a. command mode- hit ESC key to get here						  |
 	b. insert/text mode- hit either the 'i' or 'a' key:					  |	
		      >	i inserts before the current position 					  |
		      >	a inserts after the current position					  |	
 												  |
	*to get back to command mode hit ESC again*					          |
      NOTE: the ESC key is your panic button: whenever you are unsure                             |
            just what VI is doing, hit ESC!							  |
												  |
---------------------------------------------------------------------------------------------------	
												  |	
												  |
#6. To use this vi interface let us try a few important commands:				  |
												  |
 j  - moves the cursor down one line 								  |	
 k  - moves the cursor up one line								  |
 l  - moves the cursor to the right one character						  |
 h  - moves the cursor to the left  one character                                                 |	
       note: the above are useful during remote sessions when your arrow keys might not work.	  |	
 r  - replaces one character under the cursor, a count specifies the amount of characters	  |
 i  - inserts text before cursor                                                                  |   
 a  - appends text after cursor                                                                   |
 x  - deletes character under cursor, a count specifies the amount of characters		  |
 u  - undos last edit command.                                                                    |  
												  |
												  |
---------------------------------------------------------------------------------------------------
												  |
											    	  | 
#7. The following list of commands is an excerpt from the VI tutorial. They			  |
    are listed here becuase I find them to be the most important. There are   			  |
    several more commands and you will learn from many sources. Have fun!			  |
    (the carrot ^ equals control key)								  |
												  |
^D   - scroll down half a window								  |
^U   - scroll up half a window									  |	
^F   - scroll down whole window									  |
^B   - scroll up whole window									  |
^M   - moves cursor to beginning of next line						   	  |
d^   - deletes from current position to beginning of line					  |
d$   - deletes from current position to end of line						  |
dw   - deletes from current to end of word							  |
dd   - deletes a whole line									  |		
^    - sends cursor to beginning of line							  |
$    - sends cursor to end of line								  |		
(    - sends cursor to beginning of sentence							  |
)    - sends cursor to end of sentence								  |
0    - sends cursor to 1st column of line							  |
}    - sends to next paragraph									  |
{    - sends to preceding paragraph								  |
?    - search for symbol specified								  |
:1   - returns cursor to top of document							  |	
:se nu - sets line numbers								          |
^G   - tells you current line position								  |	
G    - sends to end of file									  |
												  |
***************************************************************************************************
Thanks, I hope it helps!!!									  |	
***************************************************************************************************