5 ms·
Way more useful (for me anyway) is mapping Capslock to ESC. It works with any vi anywhere as long as you are using your main machine to connect. Also with inore
by 0942v8653 11y ago
Way more useful (for me anyway) is mapping Capslock to ESC. It works with any vi anywhere as long as you are using your main machine to connect. Also with inoremap don't you have to wait for the letter j to show up until you type your next character? That would drive me crazy.
Edit now that I have actually looked at the article: Yes, you can map it to Control but for me it's an awkward place to put a modifier. What if you want to do Ctrl-A? Ctrl-C? At least the way I type, I'm better off using the one in the corner.
- cryptonaut 11y agoWas just about to post this. Though I map Caps-Lock to Esc through xmodmap so it works everywhere instead of just in Vim.
- barbs 11y agoI'd actually like to map Caps-Lock to ESC as well, but I'd prefer to make it vim-specific rather than system-specific, and there's no way to do that :(.
- bonquesha99 11y agoI have a similar remapping of Caps: * When I tap Caps, it's `<esc>` * When I hold Caps OR hit it in combination with any other key, it's `<ctrl>` It really feels like the best of both worlds. I primarily develop on OSX, so I use https://pqrs.org/osx/karabiner/ https://pqrs.org/osx/karabiner/ to handle the remapping.
- jagger27 11y agoOh man I had no idea Karabiner could do that. Thanks!
- tremendo 11y agoThis works great on my Linux machine. On the Mac though I hate that all Mac apps use Command for well, all command-key combinations instead of Ctrl, so I map the Caps-lock to Command instead, but while Karabiner can do the dual "Esc on tap plus other on hold" for Ctrl, Shift and Option keys, it cannot frustratingly do it for the Command key. ITerm can switch caps-lock back to Ctrl, but then I lose the Esc double function. It's maddening.
- berkes 11y agoI have this too, but it can be infuriating when: * I have to quickly explain something on my colleagues machine. * A colleague wants to show me something on my machine. The `<esc>` is, I daresay, one of the most ingrained keys when operating a computer. When you keep mistyping it, levels of stress will go up.