SIMPLE EDITING COMMANDS 1) Starting the Editor vi filename :edit the file "filename" 2) Moving Around Within a File h :move left one line j :move down one line k :move up one line l :move right one line G :move to the last line in the file 34G :move to line 34 :move down 1/2 screen :move up 1/2 screen :move forward 1 full screen :move back 1 full screen 3) Searching for patterns /pattern :look for the next occurrence of "pattern" ?pattern :look for previous occurrence of "pattern" n :look for the next occurrence of the most recent search pattern. N :look in the opposite direction for the most recent search pattern 4) Deleting text dd :delete this line 4dd :delete four lines dw :delete a word x :delete one character 5) Inserting Text (Type Key After Text Has Been Inserted). i :insert text before the cursor a :append text after the cursor o :insert text (open a line) below the line where the cursor sits. O :insert text (Open a line) above the line where the cursor sits. 6) Changing text cw :change one word cc :change a line 3cw :change 3 words r :replace one character 7) The Undo Command u :undo the most recent command 8) Leaving the Editor :wq :write changes and leave the editor :q! :leave the editor without writing changes