开发者

How to remap <C> (control) modifier key in vim?

开发者 https://www.devze.com 2023-01-09 13:32 出处:网络
I avoid the \"control\" key, AKA <C> in vim parlance, on my laptop; I hate where Apple put it. I would really like to remap all of the vim commands using control to instead use \"command\", but

I avoid the "control" key, AKA <C> in vim parlance, on my laptop; I hate where Apple put it. I would really like to remap all of the vim commands using control to instead use "command", but this does not seem possible on a Mac, despite what I have read. I have read that I should use <Leader> to set such mappings, but I 开发者_C百科want to avoid remapping every single <C> mapping that I can find or think of in my .vimrc, just to forget some and bloat my .vimrc.

I want to avoid xmodmap or solutions beyond the scope of .vimrc, as I want to maintain compatibility of my config files that I sync across systems.

What I really want to do is specify an alternate key (probably ,) as a modifier key equivalent to <C>.


There is definitely no vim-only solution for this; vim simply does not have this capability. Map <CapsLock> to <Ctrl> in System Preferences -> Keyboard -> Modifier Keys..., take a few minutes to adjust, and repeat for every MacBook you ever lay hands on (even if it's not yours). The world will be a better place for it.

0

精彩评论

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