2

When using the "Add Childnode", "Move Node", "Copy Node", etc. options through the "m" menu, it opens up a text field to type in the name of the destination file.

Unfortunately, I cannot figure out how to edit this text using normal mode vim keybindings. For example, using b to go backwards, or making a visual selection.

2

You can use CTRL-F from that input box to open the command-line window, which lets you use Normal mode commands and even access history to reuse a name you previously typed.

I suggest you read :help c_CTRL-F to see more details on how it works. Note that most of that help section talks about it in the context of the command-line (where you can type Ex commands), but most of that is also available for input(), which is what NERDTree uses to prompt for your input.

Some parts of it are not relevant in this context. For example, the q: command to open the command-line window from Normal mode. You can only access it with CTRL-F from the input() prompt. Otherwise, most of the information in that section (about navigating and closing the command-line window) is relevant.

| improve this answer | |
  • 1
    This is perfect! When I asked this question I was thinking about q: for NERDTree. And that help page was also useful. Didn't know about q/ either. Realized there's a lot of cool places to do <C-f> besides Nerd/Command mode. Thank you for the above and beyond answer 👍 – Max Coplan Feb 5 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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