How do I delete the last 3 lines in this text and pass level 7?

How do I delete the last 3 lines in this text and pass level 7? - A Pen Beside a To do List

I am playing level 7 of vim-adventures. I can start at the first character, the letter 'i', of this if statement. I need to delete the last 3 lines that are marked in red. I am only allowed 5 keystrokes once I am on the letter i. How to Delete the 3 red lines

I am only allowed the following commands:

vim commands I am allowed

I would want to use the command f} to take the cursor directly to line 3 but for some reason that does not work. It seems to only let me use f for within the same line. So far, I have been able to reach the letter 'e' but only had 1 keystroke left.



Best Answer

You don't have enough buttons¹ to solve this puzzle.

Hint 1

There are two solutions. For both you need a button¹ which you still need to find.

Hint 2

You have to get one yellow key² and unlock either the house on the left or the house above. One of those buttons¹ is enough to solve this puzzle

Hint 3

When you either have the % button¹ or the g button¹ you have enough to solve this puzzle

Spoiler

The full solution: Vim-Adventures in level 7

¹) = unlocked keyboard keys ²) = door unlocker




Pictures about "How do I delete the last 3 lines in this text and pass level 7?"

How do I delete the last 3 lines in this text and pass level 7? - Journal Pages
How do I delete the last 3 lines in this text and pass level 7? - Close-up Photo of May Graphing Paper
How do I delete the last 3 lines in this text and pass level 7? - Neon Sign on a Concrete Wall



How do you delete multiple lines in terminal?

Deleting Multiple Lines
  • Press the Esc key to go to normal mode.
  • Place the cursor on the first line you want to delete.
  • Type 5dd and hit Enter to delete the next five lines.


  • How do I delete a specific line in Vim?

    Deleting a single line in Vim editor:
  • First, bring your cursor to the line you want to delete.
  • Press the \u201cEsc\u201d key to change the mode.
  • Now type, \u201c:d\u201d, and press \u201cEnter\u201d to delete the line or quickly press \u201cdd\u201d.


  • Which command is used to delete entire line in command mode?

    Delete All Lines
  • First, press Esc .
  • Then, delete everything within the file by typing: :%d.
  • Once you run this command, the text editor will notify you there are --No lines in buffer-- .


  • How do you delete a line in Linux terminal?

    Just to summarise all the answers:
  • Clean up the line: You can use Ctrl + U to clear up to the beginning.
  • Clean up the line: Ctrl + E Ctrl + U to wipe the current line in the terminal.
  • Clean up the line: Ctrl + A Ctrl + K to wipe the current line in the terminal.
  • Cancel the current command/line: Ctrl + C .




  • Remove or delete different type of line in MS Word document




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: EKATERINA BOLOVTSOVA, Pixabay, Bich Tran, Ann H