Home > Linux, Programming > Vim exercises for the beginner

Vim exercises for the beginner

November 8th, 2010

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.

The exercises are available on github, but if you’re not using git (and if not, why not?!) you can download the file directly.

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.
Categories: Linux, Programming Tags: ,
  1. January 11th, 2014 at 02:35 | #1

    At this time it appears like Expression Engine is the top blogging platform out there right now.

    (from what I’ve read) Is that what you’re using on your blog?

Comments are closed.