[vim/vim] [terminal] cannot send ^w into terminal (#1874)

68 views
Skip to first unread message

mattn

unread,
Jul 25, 2017, 2:12:26 AM7/25/17
to vim/vim, Subscribed

When start vim on termianl and split window, we can't send Ctrl_w into the vim.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Marcus Karpoff

unread,
Jul 25, 2017, 8:52:16 AM7/25/17
to vim/vim, Subscribed

This is probably because Ctrl + W is mapped to be the prefix for switching windows. I haven't found a way to us remapping in the vim 8 terminal yet.

mattn

unread,
Jul 25, 2017, 9:04:17 AM7/25/17
to vim/vim, Subscribed

@mkarpoff Yes, I understand why this caused. I want to discuss people about how to send the prefix key it self into terminal. For example. tmux send prefix-key with double types of prefix-key.

Marcus Karpoff

unread,
Jul 25, 2017, 9:50:22 AM7/25/17
to vim/vim, Subscribed

Ah I see, sorry for the confusion. In that case it might be also a good idea to talk about how to remap the terminal keys as well while we're at it as I suspect the solution will involve that problem as well.

mattn

unread,
Jul 25, 2017, 11:10:18 AM7/25/17
to vim/vim, Subscribed

Thanks your suggestion. BTW, I don't use neovim but I heard neovim have tmap/tnoremap? to remap terminal keys.

Bram Moolenaar

unread,
Jul 25, 2017, 5:32:04 PM7/25/17
to vim/vim, Subscribed

Yasuhiro Matsumoto wrote:

> When start vim on termianl and split window, we can't send Ctrl_w into
> the vim.

Yes, we need something for that. Doubling CTRL-W conflicts with moving
to the next window, which is very common.

Perhap we can use CTRL-W . With the idea that dot means the current
window (like it means the current line).

Mappings are less important, let's first make most other things work.

--
hundred-and-one symptoms of being an internet addict:
250. You've given up the search for the "perfect woman" and instead,
sit in front of the PC until you're just too tired to care.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Nikolay Aleksandrovich Pavlov

unread,
Jul 25, 2017, 5:43:46 PM7/25/17
to vim_dev, reply+00b1d1987769e2761f947dbbf02cf759acffa1f...@reply.github.com, vim/vim, Subscribed
2017-07-25 18:00 GMT+03:00 mattn <vim-dev...@256bit.org>:
> Thanks your suggestion. BTW, I don't use neovim but I heard neovim have
> tmap/tnoremap? to remap terminal keys.

Neovim has separate terminal mode, with separate commands for mapping
(:tmap/:tnoremap). So `<C-w>`, as well as everything else is sending
input directly to terminal as-is, with `<C-\><C-n>` and `<C-\><C-\>`
being an exceptions for consistency reasons. As expected, if you are
not satisfied with a way to exit terminal mode you just tnoremap
something to `<C-\><C-n>` and tnoremap `<C-\><C-n>` to something if
needed.

>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

vim-dev ML

unread,
Jul 25, 2017, 5:44:09 PM7/25/17
to vim/vim, vim-dev ML, Your activity
2017-07-25 18:00 GMT+03:00 mattn <vim-dev...@256bit.org>:
> Thanks your suggestion. BTW, I don't use neovim but I heard neovim have
> tmap/tnoremap? to remap terminal keys.

Neovim has separate terminal mode, with separate commands for mapping
(:tmap/:tnoremap). So `<C-w>`, as well as everything else is sending
input directly to terminal as-is, with `<C-\><C-n>` and `<C-\><C-\>`
being an exceptions for consistency reasons. As expected, if you are
not satisfied with a way to exit terminal mode you just tnoremap
something to `<C-\><C-n>` and tnoremap `<C-\><C-n>` to something if
needed.

>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Marius Gedminas

unread,
Aug 30, 2017, 4:17:23 AM8/30/17
to vim/vim, vim-dev ML, Comment

This was fixed in 8.0.0787 (Ctrl-W . sends a ^W).


You are receiving this because you commented.

mattn

unread,
Aug 30, 2017, 4:20:37 AM8/30/17
to vim/vim, vim-dev ML, Comment

Closed #1874.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages