Tuesday, April 24, 2018

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

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?

--
--
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: