Vim comes with a great little thing called
vimtutor. This walks you through the basic Vim commands, so you’re able to get up and running. Each lesson has a small exercise to try out the command or commands taught.
Going through these lessons, I wished that there were more exercises for each lesson, so the key strokes would sink in better. So, without further ado …
Introducing Vim exercises!
I’ve only done a few lessons so far, but eventually I’d like to do exercises for all the lessons in
vimtutor. They’re designed for the complete newbie to Vim, but would hopefully be useful to anyone learning Vim.
Here’s a sneak-peek:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lesson 1.1: Moving the cursor Instructions: Follow the line around the screen using h, j, k and l. | Hint: if you accidentally start typing text, press Esc | .-------. to leave insert mode and u to undo any changes. | | | \_______/ | | | \____. | .-----------------. | | | .---------+----+----. | \_________/ | | | | | | | | | | \________. \________ Well done! Now scroll | | down to lesson 1.3 | | with j. | | \_____________/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lession 1.3: Text editing - deletion Instructions: Correct the lines of text below by deleting the unneccesary characters with x . Hint: use 0 to return to the left. Faar ouxt inn trhe unchttarteed bakckwataers oof the unfashionable end of the Weeestern sSpiral arrm ohf thze Gallaxy lies ae sm*all unregarded yellow syun. Iti ijs aaa trufth universalllly acknowledgegeged, that a sxingle manr iin possessibon of aw gopod fort^une muost bee in wantxxx of a) wife.&& Int waes lourvve at first sighght.. The feeirst time Yossarian sa9w th$e chaplain heee fell maaadly in lov*ve with himmmm. Aaas Gregor Samsa awokke onne moorning frrom uneeasy ddreams hhe founnd himmself trransformed inn hiis bbed intoo a giiigantic insecct. It was a bright cold day in April, and the clocks were striking thirteen. Twwo householllds, bothe alikee inf dignityyyy, IIIn fair% Verrrrona, whereq wiie lay# ou987r sc"ene, Frrom ++ancient grudddge brrrreak tto #new mutiny,,, Where7 ciiviil blo*od mak^es civil h=ands uncclean.