solutions to puzzles in Vim Adventures
Vim Adventures is an excellent educational game by Doron Linder. It focuses on teaching many popular commands and motions used in the Vim text editor. Here are a few disclaimers:
- My solutions may not be the only way, and may not even be the optimal way to solve the puzzles.
- I strongly suggest you attempt all levels on your own before turning to the following spoilers.
- last puzzle:
- start on first twin brother, j # E # n n ^ k $ * j j, end on second brother
 
- start on first twin brother, 
- puzzle to the right:
- start on 'N' $ j j jend on 'd', get key
- to go back, start on 'd' gg
 
- start on 'N' 
- use key to enter house and get ability to use all numbers
- puzzle below the house (with 11 key presses):
- start on 'n', which is numbered with a red '1'
- you should visit the blocks in numerical order
- 4j→- b→- 2k→- 3w→- 4$→- Tu, you are now at the space on the other side
- the key has appeared at the beginning of this puzzle, lets go back to get it
- starting at the space, 5G→to→4k
- now we have the key and can go back again to the bottom side of this puzzle, using the original way we came
 
- puzzle down and to the right of the last puzzle (with 8 key presses):
- start on the 'f', which is numbered with a red '1', and we will again go in numerical order
- fi→- 3*→- Fu→- 2*
- we are now at the other side on the 's' of 'sum', follow the path down to the '.' on the morse code looking puzzle
 
- morse code puzzle (spells out 'VIM ADVENTURES' in morse code):
- 3egets directly to the other side
- go down to lolcat sounding puzzle
 
- lolcat puzzle (16 key presses)
- starting on 'W', 3x ~ j 5~ 5j d4j fC 2rG
- the key appears at the beginning of the puzzle, 6kto go back up to get it
- go back up through the morse code puzzle, 3e k 5f.
- starting on 's' of 'sum', go back through this puzzle, 2G
- go left to '.' of next puzzle
 
- starting on 'W', 
- puzzle left of pink haired girl in bush (4 key presses)
- starting on '.', 16b(probably not the best answer to this puzzle)
- go up to puzzle with a whole lot of numbers (actually just one number, Pi, to a whole lot of decimal places)
 
- starting on '.', 
- Pi number puzzle (7 key presses)
- start on '8', 9G 2f8 4k, end on broken '5' tile
- key appears on last '8', get there with 11G 6l 4j 3l, we now have 3 keys
- and back to the start of the puzzle with 3h
- go down to previous puzzle on 'k'
 
- start on '8', 
- puzzle below Pi puzzle (4 key presses)
- start on 'k' of 'keep', 3$to get to '.' on right side
- l hto exit and re-enter puzzle from right side
- b Fato end on the 'a' above the locked gate
- go down, unlock gate, and go to next puzzle
 
- start on 'k' of 'keep', 
- deleting puzzle
- go to start of 'not so ' → d2w
- go to start of 'e22' → 3x
- go to start of '(C) Writes serverd ''s' → d3W x
- go to start of 'XOOOO XOOOOO O' → d2fX
- go to start of 'word1 w2 word1 w2 ''1' → d4W x
- go to start of bye bye→d2fe
- grab the new key (have 3 keys again)
- go down and use all keys to open three locked gates to end of level
 
- go to start of 'not so ' → 
- paste puzzle
- go down and grab the 'p' command
- delete a word with the red box around it, starting with cursor on first letter of that word
- 'you' → dw
- 'delet' → 5x
- 'real' → 4x
 
- 'you' → 
- paste those deleted words from the buffer, to where the corresponding purple bubbles show
- 'P' for pasting before cursor, 'p' for pasting after cursor
 
- grab the key after you pasted the correct word for each purple bubble
- move to the 't' and use xto save it to the register for the next puzzle
- go down and open locked gate
- go to the right
 
- t puzzle
- paste that 't' using pin all the spots that it indicates
- go left and down to the line delete puzzle below the house
 
- paste that 't' using 
- line delete puzzle below house (7 key presses)
- start on 'd' of 'round', j dj k P G p
- grab the '"' register specification
- go up to the house and save the 't' character into another register (such as "a) "ax
- go down, right, and up to the 't and x puzzle' above the 't puzzle'
 
- start on 'd' of 'round', 
- t and x puzzle (7 key presses)
- start and red boxed 'x'
- "x gg $ "ap(the- "appastes from the "a register, if that is where you saved 't' to)
- a key has appeared, 3j 2Flto get it
- go down, right, and down to the 'tweedle beetle puzzle'
 
- tweedle beetle puzzle (98 key presses)
- start on 3rd 'e' of 'beetles' → G 3j b "bdw b "adw b "Bde j "Adw "Ade k "aP G "bP
- a small brown key appears, grab it
- go back to the house at the beginning and use the small brown key on the chest
- the chest gives you the 'y' yank operator
- go back to the 'tweedle beetle puzzle' and head down to the 'one ring puzzle'
 
- start on 3rd 'e' of 'beetles' → 
- one ring puzzle
- go to start of 'One ring to ' → 3ywto yank the text
- paste where the two purple bubbles tell you to, using 'p' or 'P'
- key appears, grab it (now you have 2)
- go down to 'Hip, Hip, Hooray! puzzle'
 
- go to start of 'One ring to ' → 
- Hip, Hip, Hooray! puzzle
- delete the two red boxed lines using ddon each
- move to the 'Hip, Hip, Hooray!' line and yank it using yy
- paste it where the purple bubbles are → 2P 3j 3p
- key appears, grab it (you now have 3)
- go all the way back to the house at the beginning, and go down to the 'Delete me! puzzle'
 
- delete the two red boxed lines using 
- Delete me! puzzle (7 key presses)
- start on 't' of 'Delete' → G dd dd dd
- go down to '99 bottles puzzle'
 
- start on 't' of 'Delete' → 
- 99 bottles puzzle (15 key presses)
- check :regto see which registers you will need to use for pasting the text from
- start on 'h' of 'the' → "0P j "0p j p j "2p
- go down to next, and last puzzle
 
- check 
- last puzzle
- check :regto see which text you have saved to registers
- you need the following lines of text saved to registers:
- 'Betty rules'
- 'tweedle beetle'
- 'on the wall'
- 'One Ring'
 
- go back to the previous puzzles and save each to a different register using yank
- I saved each, in order, from registers a-d, starting on the first character of each phrase:
- 'Betty rules' → "aywfor 'Betty ' +"Ayefor 'rule' +"Ay$for 's' (on the last 's' of 'darkness', because it was the last character on the line)
- 'tweedle beetle' → "b2yefor 'tweedle beetle'
- 'on the wall' → "c3yefor 'on the wall'
- 'One Ring' → "d2yefor 'One Ring'
 
- 'Betty rules' → 
 
- I saved each, in order, from registers a-d, starting on the first character of each phrase:
- go back to this puzzle and past the phrases in the right spot, using the right registers
- for me, starting on the first space → "aP 6l "bP l "cp $ "dp
 
- for me, starting on the first space → 
- a new island appears, follow the path left and up and unlock the 3 gates to the end of the level
 
- check 
- go down to miracle puzzle
- miracle puzzle (15 key presses)
- yank 'you' with ye
- leave puzzle and re-enter on 'r' of 'rush' → P b ~ 3w yw j w P rs
- grab 'c' change operator
- go down to change puzzle
 
- yank 'you' with 
- change puzzle (44 key presses)
- start on 'C' of 'Ctrl+1,' → 3CEsc<Esc> j CInsert mode<Esc> G w cwreturn to<Esc> 2w c2wmode<Esc>
- go down to second change puzzle
 
- start on 'C' of 'Ctrl+1,' → 
- second change puzzle
- edit each of the following red boxes, starting on the first letter of each box:
- 'terrible ' → dw
- 'deleting' → cwediting<Esc>
- '!' → r?
- 'ctrl' → cwBackspace<Esc>
- 'Shift' → cwDelete<Esc>
- last line → ccto fix it.<Esc>
 
- 'terrible ' → 
- grab the 's' substitute command
- go back to the start of the level (at the top) and go right to the Gandalf puzzle
 
- edit each of the following red boxes, starting on the first letter of each box:
- Gandalf puzzle (8 key presses)
- start on 'G' of 'Grey.' → * CWhite<Esc>
- go right to another editing puzzle
 
- start on 'G' of 'Grey.' → 
- editing puzzle
- edit each of the following red boxes, starting on the first letter of each box:
- 'i' → x
- 'it' → 2x
- 'vegetarian dinosaurs,' → Slocal fisherman,<Esc>
- 'fl' → 2sn<Esc>
- 'volcanic lava!' → Swaters...<Esc>
 
- 'i' → 
- :lsto view buffers, we are going to the ground →- :b1
- go up to first ground puzzle
 
- edit each of the following red boxes, starting on the first letter of each box:
- first ground puzzle
- edit each of the following red boxes, starting on the first letter of each box:
- 'hat' → 3x
- 'p' → rs
- 'i' → swa<Esc>
- 'cookies' → cwchocolates<Esc>
- 'always' → cwnever
- 't' → rw
- 'o nuts' → c2wet<Esc>
 
- 'hat' → 
- grab the blue key
- go right, and down to second ground puzzle
 
- edit each of the following red boxes, starting on the first letter of each box:
- second ground puzzle (20 key presses)
- start on the '8' → w s15<Esc> w cw16<Esc> 3l x w 4C42<Esc>
- grab the small brown key
- :lsto view buffers, we are going to the sky →- :b2
- use blue key to open the blue door
- use the small brown key to open the chest, get the 'i' insert command
- go left to beginning of level, and then all the way down to the 'Watson puzzle'
 
- start on the '8' → 
- Watson puzzle (6 key presses)
- IElem<Esc>
- go right to next sky insert puzzle
 
- sky insert puzzle (33 key presses)
- start on 'Y' of 'You've' → W igot<space><Esc> j Iyourself<space><Esc> G iWell<Esc> k l iI<space><Esc>
- grab the 'a' append command
- :lsto view buffers, we are going to the ground →- :b1
- go up to the Hakuna Matata puzzle
 
- start on 'Y' of 'You've' → 
- Hakuna Matata puzzle
- start on 'H' of 'Hakuna' → `Y gg P j p 6l k awonderful Ta 2j ino h 2j ano 0 iIt h 2j iIt $ aphilosophy
- grab the blue key
- :lsto view buffers, we are going to the sky →- :b2
- open blue door
- grab the 'o' open command
- go back all the way left and up a bit and left to the 'D'oh' puzzle
 
- D'oh puzzle (4 key presses)
- 5A!<Esc>
- go right to the big edit puzzle
 
- big edit puzzle
- edit each of the following red boxes, starting on the first letter of each box:
- 'mally' → ce instance,<Esc>
- 'e' → ~
- 'was far less smart' → Swas more intelligent<Esc>
- 'lousy' → cwgood<Esc>
 
- 'mally' → 
- fill in what the purple bubbles tell you to, using aandiando
- :lsto view buffers, we are going to the ground →- :b1
- go up to 'beat it puzzle'
 
- edit each of the following red boxes, starting on the first letter of each box:
- beat it puzzle (20 key presses)
- start on 'N' of 'No' → 4OBeat it<Esc> gg ~ IJust <Esc>
- go down to puzzle below arrow island
 
- start on 'N' of 'No' → 
- puzzle below arrow island (33 key presses)
- start on first line → OYou mean<Esc> j oall I had<Esc> G Oclick my<Esc>
- go across the bridge to arrow island
 
- start on first line → 
- arrow island
- start at 'O' of 'Open' → cw:e<Esc> w cWundeground<Esc>
- grab the red key
- type :e underground
- open red gate, go down to underground puzzle
 
- start at 'O' of 'Open' → 
- underground puzzle (20 key presses)
- start on 'o' of 'You' → w cwSHALL<Esc> l p 4l cw!<Esc> 3h p
- talk to the princess to finish the level
 
- start on 'o' of 'You' → 
- puzzle with d, j, and 5W bugs
- kill the three bugs
- d → ddwhen it is in the same line as you
- j → yjwhen it is below you
- 5W → d5Wwhen you are within 5 WORDS away
 
- d → 
- get '( )' motions for navigating sentences
 
- kill the three bugs
- puzzle with gg, G, (, ), *, and # bugs
- kill the 6 bugs
- gg → dggwhen it is anywhere above you
- G → dGwhen it is anywhere below you
- ( → d(when it is within the previous sentence
- ) → d)when it is within the next sentence
- 
- → d*when it is anywhere above you
 
- → 
 
- gg → 
- get the '[{, [(, ]), and ]}' motions for finding unmatched braces and parenthesis
 
- kill the 6 bugs
- puzzle with t and ^ bugs
- kill the 2 bugs
- t → dt!when it is to the right of you on the bottom line of it's puzzle
- ^ → d^when it is to the left of you on same line
 
- t → 
- get '{ }' motions for navigating paragraphs
 
- kill the 2 bugs
- puzzle with {, }, T, F, and $ bugs
- kill the 5 bugs
- } → d}when it is forward within the same paragraph as you, you move to end of paragraph
- { → d{when it is backward within the same paragraph as you
- T → dTTwhen you are on the top line of it's puzzle, and it is to your left
- F → get to right side of puzzle, and dF<character bug is on>
- $ → d$when it is to the right of the cursor, on the same line
 
- } → 
- get small brown key
- go right and down to paragraph puzzle
 
- kill the 5 bugs
- paragraph puzzle
- start on '*' → }to jump paragraph to the space, and}again to kill the bug
- 2$ ]}to kill the ']}' bug
- kill 3 and F bugs → dFpandd3Bwork nicely if you are on the end of the top line
- kill the k and l bugs → dkworks if you are on the last '}', andd<some number>l
- chest appears, open it to get 'ia' text objects
- back to beginning and down and to the left to numbered puzzle
 
- start on '*' → 
- numbered puzzle (8 key presses)
- )→- 2)→- (→- 2)→- )
- go down to '7' → ])
- go down to next bug puzzle
 
- bug puzzle
- kill bugs:
- 2[ → d2[{
- 3] → d3]}
 
- 2[ → 
- grab key
- go way back, up and right, and open door with new key
- go left to text object puzzle
 
- kill bugs:
- text object puzzle
- kill bugs:
- a( → da(within a () block
- i( → di(within a () block
- a[ → da[within it's [] block
- ap → dap
- 2a} → d2a}
- a{ → da{
 
- a( → 
- change text, start at first character:
- '[0,1,2,3]' → ca[endl<Esc>
- '(i+3)/(j-23)' → c2i(i+1)*(j+1)<Esc>
 
- '[0,1,2,3]' → 
- grab the red key
- go up and to the right to the hello world puzzle
 
- kill bugs:
- hello word puzzle
- kill bugs:
- a → from top d3apwill delete the bug because it is within the next three paragraphs
- ) → from top d4)
- i( → Gto get to the bottom, then4kto get within the '( )' pair, thendi(
- % → d%
 
- a → from top 
- go back to top with gg, time to edit
- W 2j ci<head<Esc> j c2a[<script><Esc> 4j ci{<Space><Space>alert('Hello World!');<Esc>
- Gto get the blue key
- go back to near the beginning, and open blue door
- go up to yoda puzzle
 
- kill bugs:
- yoda puzzle
- kill bugs:
- three a" bugs → ggto top of text,da"on each line that a bug is on
- i" → di"on same line as bug
 
- three a" bugs → 
- edit text → gg ci"No!<Esc> 4G ci'do not.<Esc>
- grab the second red key
- go open the first red key gate on the right
- go down to right red gate puzzle
 
- kill bugs:
- right red key puzzle
- use iandato add in the words requested by the purple bubbles- starting on 'I' of 'In' → fh 3j "ayl 3k "Ayw 2j P k p b j b j P 3w j "cy2aw 5j yiw 5w P 3h 6j "cp 3e "cp
- grab the '.' repeat command
- go back and open the left red door, and head down to the left red key puzzle
 
- starting on 'I' of 'In' → 
 
- use 
- left red key puzzle
- kill bugs while standing at start of puzzle on 'r' of 'her':
- s → das
- i → dis
 
- s → 
- edit text → dapwhile on 'r' of 'her'
- go down to function puzzle
 
- kill bugs while standing at start of puzzle on 'r' of 'her':
- function puzzle (23 key presses)
- start on 'u' of 'function' → % di( B 2j ciwisOver<Esc> 2j . 3j .
- grab the blue key
- move down to the fizz buzz puzzle
 
- start on 'u' of 'function' → 
- fizz buzz puzzle (42 key presses)
- $ cwBuzz<Esc> 6w . 2b cwFizz<Esc> 7b . 4w . 7w . 3w cwFizzBuzz<Esc>
- go left to little indians puzzle
 
- little indians puzzle (53 key presses)
- 6B * ciwIndians<Esc> n . 2n . n 3. n . 2n . n c5iwIndian boy<Esc> n . as<Esc>
- go down, open blue gate
- talk to princess to finish level, and move on to level 14 (not 13)
 
- all motions are gone!
- yipto get 'H' high motion
- Hand use- zbto get the 'L' low motion
- Land use- ztrepeatedly to scroll down and get the '1-9' counts back
- :47<Enter> 6Lto get the 'nu' and 'nonu' boolean options
- :set nuto turn line numbers on
- use a count + H, with the help of line numbers, to go up and get the 'M' middle motion
- :regto view the registers, and find out that the next directions are in the ground buffer- :lsto view buffers →- :b1to go to ground to view hints for the lorem buffer
- :lsto view buffers →- :b4to go back to the lorem buffer
 
- hints from ground buffer, for lorem buffer, lead to:
- :41<Enter>to uncover the '|' pipe motion in the bush
- :33<Enter> 39|to get the '/ ?' search motion
- :11<Enter> 47|to get the '`' mark motion
- :52<Enter> 4?prowhich leads to the 'pro' on line 37,- 68|is the space right before the 'pro', which has a portal (we'll return to this later)
 
- :43<Enter> 10|to get to the blinking white cursor (Mr. White)- talk to Mr. White to learn about marks
- learn that we had a plan to kill Big Bug, before we lost our memory
 
- :4<Enter> 55|to get to Mr. Blue- learn how to teleport to global marks (`<global mark name>, eg:`L)
- learn Mr. Pink couldn't control himself and almost changed colour (interesting), and that's why the plan to kill Big Bug failed
 
- learn how to teleport to global marks (
- :50<Enter> 64|to get to Mr. Pink- learn how to list marks (:marks) and how to delete them (:delm)
- continue to not forgive Mr. Pink, until he loses his temper and turns into Mr. Red
- talk to Mr. Red to learn about Big Bug and how to destroy him (text in the sky tells where to place marks in the underground)
 
- learn how to list marks (
- :lsto view buffers →- :b2to go to sky buffer
- `Wto go to the W mark puzzle
- W mark puzzle
- :4<Enter> 13| d18aw→- :1<Enter> 9| d/clever<Enter>
- :2<Enter> 5|to grab 'CTRL-R' redo command
- go to H mark puzzle
 
- H mark puzzle (13 key presses)
- :delm! :4<Enter> 30|
- ?'to grab the single quote jump to mark line motion
- go to the A mark puzzle by using 'A(that is the single quote, not backtick)
 
- A mark puzzle (7 key presses)
- d'Ato kill bugs on top line, and- .to repeat command → kill all bugs
- 2/m<Enter>to get the 'm' set mark command
- go to the D mark puzzle
 
- D mark puzzle (29 key presses)
- :delm<Space>Dthe<Enter> 2| mo ?<Space>o<Enter> mM ?<Enter> my ?<Enter> me
- :7 7|to grab the yellow star
- lets take that star to the yellow star portal that we found in the Lorem buffer:
- :b4to get to the Lorem buffer
- :37 68|to get to the star portal
- it teleports us to the B mark puzzle
 
 
- B mark puzzle
- mB 16| mg :2 mi 14| mu
- a chest appears on the x, but we don't have the key yet
- :reg<Enter>and notice the message on the "y register:- go to `Wand then go to`Y, but don't skip the scrolling
- we can see the hint 'Toadstool (Peach is also interesting...)'
- go to the P mark puzzle
 
- go to 
 
- P mark puzzle
- :marksto view the marks and their associated text
- remember our hint from the WY mark scrolling → Toadstool, Peach → lets view these words as marks:
- :marks Toadstool<Enter>→ this shows the marks in alphabetical order, and reveals a message → The power of undo will beat Big Bug
- the brown key is also revealed, get it with :5<Enter>
- :marks Peach<Enter>→ also reveals a message → The cursors are NOT friends!
- lets go back to the B mark and open the brown chest → `B 9|to get the 'u' command
- all previous motions and commands are now restored!
- go to the U mark puzzle
 
 
- U mark puzzle
- CTRL-R→ the words 'Uganda', 'Bram', and 'Charity' are to remember
- :lsto view buffers →- :b3to go to underground buffer and start the underground mark puzzle
 
- underground mark puzzle
- :9<Enter> mBto set B mark,- 31| mg to set g mark
- :2 mito set i mark
- :17 muto set u mark
- time to fight Big Bug and his three minions (formerly cursors)!
 
- Big Bug fight
- search for 'Uganda', 'Bram', and 'Charity' to kill the smaller bugs (those are their hidden names)
- eg: ?Uganda<Enter>or/Uganda<Enter>
- you can repeat searches in the underground buffer with /<Enter>and?<Enter>
- big bug moves fast so using repeated searches is very helpful
- moving between the corners with gg and G$ will give you the most time to run the search commands before big bug gets to you
- when you kill one, it won't come back, so keep going back to the underground buffer until you kill all three, then focus on Big Bug
 
- eg: 
- to hurt Big Bug you must use undo (u) and redo (CTRL-R), which will cause a lightning strike where edits were made- type 99uand99<CTRL-R>to do lots of damage at once
- if you die, Big Bug regains health, so you must be quick and use motions like gg,G,0, and$to dodge around
- you can spam {and}to go from corner to corner
- this will force him to cross edited text when he scrapes along the top and bottom of the screen for easy damage
- take Big Bug's health to zero, and he will die
 
- type 
- Congratulations!  <CTRL-R>repeatedly to redo all the changes, and then the final cutscene will happen
 
- search for 'Uganda', 'Bram', and 'Charity' to kill the smaller bugs (those are their hidden names)
- THE END!