Is there a way to map Ctrl period and Ctrl comma in Vim?

后端 未结 4 424
深忆病人
深忆病人 2021-02-06 21:52

I can\'t seem to find a way to map period and comma in Vim. Is it possible?

4条回答
  •  感情败类
    2021-02-06 22:31

    Due to the way that the keyboard input is handled internally, this unfortunately isn't generally possible today, even in GVIM. Some key combinations, like Ctrl + non-alphabetic cannot be mapped, and Ctrl + letter vs. Ctrl + Shift + letter cannot be distinguished. (Unless your terminal sends a distinct termcap code for it, which most don't.) In insert or command-line mode, try typing the key combination. If nothing happens / is inserted, you cannot use that key combination. This also applies to / , / / / etc. (Only exception is / .) This is a known pain point, and the subject of various discussions on vim_dev and the #vim IRC channel.

    Some people (foremost Paul LeoNerd Evans) want to fix that (even for console Vim in terminals that support this), and have floated various proposals.

    But as of today, no patches or volunteers have yet come forward, though many have expressed a desire to have this in a future Vim 8 major release.

提交回复
热议问题