Lesson 1 SUMMARY

1. The cursor is moved using either the arrow keys or the hjkl keys. h le!t" j down" k u#" l right"

$. To start %im !rom the shell #rom#t ty#e& vim '(L)*AM) +)*T)R,

-. To e.it %im ty#e& 2R ty#e&

+)S/, &01 +)*T)R, to trash all changes. +)S/, &w0 +)*T)R, to save the changes.

3. To delete the character at the cursor ty#e& .

4. To insert or a##end te.t ty#e& i ty#e inserted te.t +)S/, A ty#e a##ended te.t +)S/, insert 5e!ore the cursor a##end a!ter the line

*2T)& 6ressing +)S/, will #lace you in *ormal mode or will cancel an unwanted and #artially com#leted command.

d motion

7here& d 8 is the delete o#erator.

motion 8 is what the o#erator will o#erate on listed 5elow".

A short list o! motions& w 8 until the start o! the ne.t word9 ):/LU;(*< its !irst character.

To move to the start o! the line use a Aero& B C. To delete !rom the cursor to the end o! a line ty#e& -. @.SUMMARY . To re#eat a motion #re#end it with a num5er& $w 4. The !ormat !or a change command is& o#erator >num5er? motion where& o#erator 8 is what to do9 such as d !or delete >num5er? 8 is an o#tional count to re#eat the motion motion 8 moves over the te.(*< the last character. To delete a whole line ty#e& dd dw d= 3. Lesson $ SUMMARY 1. = 8 to the end o! the line9 (*/LU.t word ty#e& $.t to o#erate on9 such as w word"9 = to the end o! line"9 etc. To delete !rom the cursor u# to the ne. To undo #revious actions9 ty#e& u lowercase u" To undo all the changes on a line9 ty#e& U ca#ital U" To undo the undoDs9 ty#e& /TRL8R Lesson .e 8 to the end o! the current word9 (*/LU.(*< the last character.

A!ter a search ty#e n to !ind the ne. $. To #ut 5ack te. !or the #hrase. !ollowed 5y a #hrase searches GA/H7AR. !or the #hrase. 3. This #uts the deleted te.t that has just 5een deleted9 ty#e # . gg moves to the !irst line. eg.t A'T)R the cursor i! a line was deleted it will go on the line 5elow the cursor". < moves to the end o! the !ile. The change o#erator allows you to change !rom the cursor to where the motion takes you. Ty#ing E Ty#ing F !ollowed 5y a #hrase searches '2R7AR. -. Ty#e ce to change !rom the cursor to the end o! the word9 c= to change to the end o! a line.t occurrence in the same direction or * to search in the o##osite direction.1. num5er < moves to that line num5er. To re#lace the character under the cursor9 ty#e r and then the character you want to have there. /TRL82 takes you 5ack to older #ositions9 /TRL8( to newer #ositions. The !ormat !or change is& c >num5er? motion Lesson 3 SUMMARY 1. /TRL8< dis#lays your location in the !ile and the !ile status. . $.

4. &w '(L)*AM) writes the current %im !ile to disk with name '(L)*AM)." &1ls 8 shows a directory listing.am#les are& MS8. 3.ecutes an e.-. $. 3. &r '(L)*AM) retrieves disk !ile '(L)*AM) and #uts it 5elow the cursor #osition. Ty#ing I while the cursor is on a 9"9>9?9J9 or K goes to its match. -. v motion &w '(L)*AM) saves the %isually selected lines in !ile '(L)*AM). &1command e. To su5stitute new !or the !irst old in a line ty#e To su5stitute new !or all DoldDs on a line ty#e To su5stitute #hrases 5etween two line LDs ty#e To su5stitute all occurrences in the !ile ty#e To ask !or con!irmation each time add DcD &sEoldEnew &sEoldEnewEg &L9LsEoldEnewEg &IsEoldEnewEg &IsEoldEnewEgc Lesson 4 SUMMARY 1. &1del '(L)*AM) &1rm '(L)*AM) 8 removes !ile '(L)*AM).ternal command.2S" &1dir Uni. &r 1dir reads the out#ut o! the dir command and #uts it 5elow the . Some use!ul e.

cursor #osition. .