7

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
  • 2
    Does this answer your question? How to move the cursor out of the terminal
    – Mass
    Apr 3 '20 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 '20 at 23:11
5

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

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

Useful reference: https://vimhelp.org/terminal.txt.html#terminal-typing

0
10

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.

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.