开发者

How can I create a mapping with control and a function key in Vim?

I would like to have a mapping to quickly quit all buffers, for use when I'm vimdiffing a lot of files. Control and a function key together proved a good safety, so that I don't accidentally hit this combinatio开发者_JAVA百科n, unintentionally leaving Vim. I tried the following mapping:

map <C-F10> :qa<CR>

To no avail. If I ditch the control, I can quit with F10 alone—why doesn't control work with F10 in my mapping?


I suspect you are using vim and not gvim. vim keybindings are limited by the terminal we are running vim within.

I've given up on vim, and I systematically use gvim for that reason.


Luc is right - I just tried that in gvim (well, MacVim) and it worked fine. Then I tried it in the terminal with no joy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜