I've found this setup works wonderfully when using vim intensively on a Mac.
First, I swap the <kbd>ctrl</kbd> and <kbd>Caps Lock</kbd> keys on the left side of the keyboard, so I can easily reach the <kbd>ctrl</kbd> key with my left pinky. Most of my keyboard shortcuts in vim that don't involve the leader key use <kbd>ctrl</kbd>.
- Go to
System Preferences > Keyboard > Modifier Keys
Caps Lock -> Control
Control -> Caps Lock
Then, I setup the <kbd>ctrl</kbd> key (formerly <kbd>Caps Lock</kbd>) to only function normally if pressed in combination with another key (enabling keyboard shortcuts). The rest of the time (i.e. if pressed by itself) it functions as another <kbd>esc</kbd> key. This means that, instead of mapping escape to
ii or something, I get both keys for free in an easily accessible location.
- Install Karabiner
- Find the
Change Key > Change Control_L Key (Left Control)
- Check the
Control_L to Control_L (+ When you type Control_L only, send Escape)setting
- Enable it on login at
System Preferences > Users & Groups > Login Items