4

I am very fond of Vim's :terminal, though whenever I use Ctrl-w (expecting to erase the last typed word at prompt), Vim captures the key press and enters pane navigation mode. So I end up having to esc and then perform multiple backspaces. This wastes precious milliseconds of life.

I tried Ctrl-Backspace (default behavior in many GUIs) and also nothing. What could be a workaround?

  • 2
    Does this answer your question? How to move the cursor out of the terminal – Mass Apr 3 at 19:58
  • 2
    Absolutely not. It is easy to Ctrl-W and get out of terminal. I want the opposite. I want to stay at the terminal and to have the last word erased as this would happen in any other terminal. – fde-capu Apr 3 at 23:11
5

You can set 'termwinkey' to a sequence other than <C-W> to use a different keystroke to access the special sequences on the terminal.

For example:

set termwinkey=<C-X>

Or:

set termwinkey=<F1>

See also :help terminal-typing.

| improve this answer | |
3

To send the original keystroke, you can use <C-w>.

That said, I too find it annoying to have to remember.

| improve this answer | |
  • 1
    Upvote, because your answer is based on default behavior (does not need any special tweak), which I like. However, I did ask for a workaround. – fde-capu Apr 5 at 2:56

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.