Wednesday, April 25, 2018

Re: I'd emulate Ctrl-Space keypress and CLI with Esc using map

On Wed, Apr 25, 2018 at 6:15 AM, Takao Fujiwara <fujiwara@redhat.com> wrote:
> I'd like to create a new shortcut key of `F4` to send Esc to vim but
> Ctrl-space to xterm, gnome-terminal instead of vim.
>
> Seems the command `imap <F4> <Esc> :call feedkeys("\<C-Space>")<CR>` does
> not send Ctrl-Space.
>
> Do you have any ideas?
>
> I also tried the two commands:
>
> nmap <silent> <F4> :!ibus engine anthy<CR>a
> imap <silent> <F5> <Esc>:!ibus engine xkb:us::eng<CR><CR>
>
> They work if I run each command directly in vim buffer. But they do not work
> if I save them in vimrc.
>
> Do you have any ideas?

See :help CTRL-\_CTRL-G

N.B.
1. You can use a single {lhs} for nmap and imap, Vim won't mix them up.
2. (about the RTFM above) 'insertmode' should only be set in the
so-called "easy Vim" (actually a Notepad look-alike :-P )

Best regards,
Tony.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: