<i>Perhaps I have spent so much time on Mac that pressing the Ctrl key for things feels unnatural vs. the Command key</i><p>Argh. OS X is the last significant platform that gets this right by not trying to use Control for menu shortcuts out of the box. When I'm in a terminal, or editor, or browser text box, it's perfectly common and reasonable to want to distinguish Control-V (literal) from Command-V (paste), Control-Z (suspend) from Command-Z (undo), and so on.<p>Pre-Linux X Window software typically managed this, using Meta or some other keysym for GUI operations, but current ‘desktops’ seem dead set on imitating MS Windows. Damn kids get off my screen.
I basically do this, but I use "," (comma) as my leader, and I make capslock do double duty as ctrl and esc using KeyRemap4MacBook (<a href="https://pqrs.org/macosx/keyremap4macbook/" rel="nofollow">https://pqrs.org/macosx/keyremap4macbook/</a>). The trick is first remap capslock to Ctrl in keyboard system preferences, then use KR4MB to remap Control_L (the left control key, which is to say, what capslock now signals) to Control_L, but if you type ONLY Ctrl_L it sends esc. so when i need escape, it sends that. when i want to use it for Ctrl-modified combos, it does that. Works fantastically for Vim, i've been doing this for a couple years now. Also nice for emacs keyboard shortcuts in other apps that respond to them.
To the many of you using Macbooks: be aware the that the caps lock key is deadened/delayed in order to prevent mistaken pressing, and that this is a hardware feature that can't be changed. This may be the case for Mac keyboards and other new systems as well.
I use <space> as my Easymotion leader..<p><a href="https://github.com/Lokaltog/vim-easymotion" rel="nofollow">https://github.com/Lokaltog/vim-easymotion</a><p>it's well worth a look, gives you super quick fine grained movement<p>similarly<p><pre><code> inoremap jj <ESC>
</code></pre>
to take you from INSERT mode to NORMAL mode is nice
I use CapsLock as escape but had I not gotten so used to that by now I would probably have used it for control instead and mapped escape to jk or something. I, like many people, use `,` for my <leader> and with Clever-F[0] I don't lose the original functionality which is just remapped to consecutive presses of 'f'.<p>[0]: <a href="https://github.com/rhysd/clever-f.vim" rel="nofollow">https://github.com/rhysd/clever-f.vim</a>
Love spacebar as the leader key, but not a fan of CapsLock as Esc. CapsLock as Ctrl is better. For one, you never have to stretch for the real Ctrl, and two, you <i>can</i> use it for escape as well: Ctrl-[
I broke things down by priority. I notice that I jump around in documents by searching through them, rather than by navigation keys. Spacebar is the biggest key on the keyboard, so, spacebar is mapped to "?" in normal mode. I also find that I need to search through a project regularly, so ctrl-spacebar is mapped to the ack/ag command.<p>Control is mapped to caps lock at the os level for me. There are also too many useful commands in vim that use control (visual block mode is huge). I tried mapping jj to escape as well, but ctrl-c is just as easy.<p>Leader is mapped to comma. Most of my leader commands are comma + "some letter I can type with my left hand".
I prefer remapping capslock to control for easier use of commands like <C-f>, <C-b>, <C-e>, <C-h>, and <C-l> (all of which were absent in the example vimrc posted). Using the leader key makes total sense for dealing with splits and buffers or plugins you might want to look into some of the other Control based commands that Vim supports.
Thanks for the easy-to-understand take on the leader key. Not using the leader key is one of my known vim weaknesses I've been meaning to fix. I found your explanation and usage a great push into actually putting it in my .vimrc
I end up using Ctrl for a bunch in vim: visual block, ctrlp (and <C-b> for buffer mode), window nav, and most importantly, imported emacs keybindings. The emacs line motion commands (specifically <C-a>, <C-e>, and <C-d>) are extremely useful because they work in every app on my mac, so not having to lose flow when I'm in vim or a browser is nice.<p><a href="https://github.com/CGamesPlay/dotfiles/blob/master/files/vimrc#L152" rel="nofollow">https://github.com/CGamesPlay/dotfiles/blob/master/files/vim...</a>
I've been using this since [~2010](<a href="https://github.com/sethwoodworth/dotfiles/commit/801f4a7163db017c0be7edaee2e358b7f3d4bf50#diff-4e12c6a37ff2cbb2c93d1b33324a6051R77" rel="nofollow">https://github.com/sethwoodworth/dotfiles/commit/801f4a7163d...</a>). I highly recommend leader as space.
Why not map caps lock key to both escape AND control? I've been doing this successfully for a long time and couldn't live without it. You can use Autohotkey on windows and similar tools on other systems to interpret caps lock pressed by itself as escape, and caps lock pressed + another key as control.
The is a way of minimizing the frequency of having to reach esc (be it at esc or caps lock)
" jj For Quicker Escaping between normal and editing mode.
inoremap jj <ESC>