vim terminal and control c

63 views
Skip to first unread message

kingca...@gmail.com

unread,
Nov 9, 2020, 10:21:03 AM11/9/20
to vim_use
Hello, is there a way to send a <CTLR-C> to a terminal in vim - a terminal opened with :term?

I've tried finding it in the docs, and maybe it's there somewhere, but I haven't been able to find it. By the way, I mostly use Windows - so if it just works great on most Unix based systems, I wouldn't know (and am jealous).

Christian Brabandt

unread,
Nov 9, 2020, 11:12:11 AM11/9/20
to vim_use
Doesn't that happen by default? I believe all keys should be forwarded
except for the 'termkey' one and some special Ctrl-\ ones (like
Ctrl-\ CTRL-N)

Please also have a look at :h terminal-typing it also explains a bit
about the CTRL-C case


Best,
Christian
--
Fehlermeldung auf dem Bildschirm, der User liest, stutzt, schaut fragend
um sich und: "Wer zum Kuckuck ist "General Failure" und was hat der auf
meiner Festplatte zu lesen?"

meine

unread,
Nov 9, 2020, 11:21:12 AM11/9/20
to vim...@googlegroups.com
On Mon, Nov 09, 2020 at 07:21:03AM -0800, kingca...@gmail.com wrote:
> Hello, is there a way to send a <CTLR-C> to a terminal in vim - a terminal
> opened with :term?

I just tried ':term' and you will get a regular terminal. Mine doesn't
accept GUI-ish commands, but that might depend on the terminal program
you use.

//meine

Dominique Pellé

unread,
Nov 9, 2020, 11:38:32 AM11/9/20
to Vim List
It works for me on Linux x86_64. Maybe this is
an issue specific to Windows?

I opened a terminal (running bash shell) and ran:

$ while true; do echo -n x; done

Pressing CTRL-C interrupts it immediately in the
when running in a xfce4-terminal. In GVim GTK3
it sometimes takes a couple of seconds to interrupt
but it works.

Regards
Dominique
Reply all
Reply to author
Forward
0 new messages