


                Editing files in Unix/Linux
                
                there is only 1 universal editor in Unix/Linux
                
                named: vi
                
                to start vi I run
                
                $ vi <file name>
                
                vi has 3 Modes:
                
                1) the Command Mode - everything I type effects the file
                                       but NOT in the text
                                       for example, if I type
                                       x it will delete the char under the cursor
                                       You start in Command Mode
                                       
                2) Insert Mode - here eveything I type goes into the text
                                      I enter Insert Mode from a Command Mode
                                      command, I leave Insert Mode by hitting
                                      the <ESC> key
                                      
                3) last Line Mode - here I enter commands to save, quit, search
                                     I enter Last Line mode from Command Mode
                                     by entering a ':'
                                     
                                     
                the basic vi you need to know:
                
                1) start vi
                    $ vi <file name>
                2) turn on line numbers
                    :set number
                3) insert text 
                    move my cusor where I want to start inserting
                      i - insert before cursor
                      a - insert after cursor
                      o - open a new line before the current line
                      hit <ESC> to leave Insert Mode
                4) delete text
                    in Command Mode (hit <ESC>)
                    dd - delete a line
                    x - delete a char
                5) save/quit
                    in Command Mode (hit <ESC)
                    :q! - quit w/o save
                    :wq - write and quite
                    :w - write (save) and continue
                    
                      
                      
                    
                    
                    
                                     
                                     
                                       
