Wednesday, March 16, 2016

Mapping to

According to the documentation these commands

map <F1> <Esc>
map! <F1> <Esc>

should be sufficient to map <F1> to <Esc> in all major mapping modes.
However in this case <F1> doesn't stop Select mode and acts like <CR>
in Command-line mode.

I found that desired effect could be achieved by using

map <F1> <Esc>
map! <F1> <Esc>
cmap <F1> <C-C>
smap <F1> <Esc>

Why is that? Is there anything special about <F1> key?

--
Dmitri Vereshchagin

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

Post a Comment