4

I am stuck on this:

VIM adventures level 10

And these are the keys I have available:

keymap

2

1 Answer 1

4

When you yank or delete, contents are saved to the registry. At your disposal you can save to a specific register by prefixing with a "a,"b,"c, etc. You also have the ability to append to a specific register by using the register's capital form instead of the lowercase one. Example, where * indicates were the cursor is located:

battle *tweedle paddle                         command:"ayw

typing :reg will show us that in register a:

"a    tweedle

notice that there is a space after tweedle since we grabbed with w. Now if we move the cursor to battle (perhaps with b):

*battle tweedle paddle                         command:"Ayw

register a now includes:

"a    tweedle battle

you can then paste the result with "ap to yield: tweedle battle. notice that there will be a trailing space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.