Level 10 vim adventures beers on the wall complete solution
I saw this question Bottles of beer in level 10 but it doesn't have a full solution. What is the full solution to the 99 bottles of beer on the wall for Vim adventures?
Context:
for the sake of being a good SO member I will give more details but a full solution will answer my question.
It seems from reading the other post that my register is incorrect for some reason. I can't get the <NL>
. I think that's the issue since pasting won't work...
Solution 1:
From the posted screenshot, I see that you deleted the red text under "Delete me!" -- but I see only some of it in your registers. You need:
99 bottles of beer<NL>
pass it around,<NL>
on the wall.<NL>
I see the first one, but not the latter two. I'm guessing you somehow overwrote them with battle, tweetle, etc. In that case, I think you have to restart the level with :level 10
. (I tried to cobble together what's needed, with a combination of "[LETTER]y[motion]
-- yanking into a register labeled with a letter, using a capital letter to append the newly yanked material into the register instead of overwriting. It didn't work because I found no way to yank a newline in level 10.)
I've just confirmed the following recipe works.
- Enter the "Delete me!" text. 7 keypresses left.
- Use
G
to get to lower left corner of the text. - Use
dd
three times, to get the three lines of text into your registers. - Using
:reg
, you should see:
"" pass it around,<NL>
"1 pass it around,<NL>
"2 on the wall.<NL>
"3 99 bottles of beer<NL>
Next, go into the "on the wall," puzzle.
-
"3P
to paste "99 bottles..." above your position (note the capital P). -
j
to go down a line, and"3p
to paste "99 bottles..." below your position (note lower-case p). -
j
to go down a line, and"1p
to paste "pass it around" below your position. -
j
to go down a line, and"2p
to paste "on the wall" below your position.
That completes the puzzle. A pink-haired NPC appears with info about the "Black Hole register" (which works as an alternate way to complete the "If you can't explain it simply" puzzle).
Note that in step 3, "1p
also could be simply p
.
Happy Vimming!