Vim: Spacebar as leader key, CapsLock as Esc
karmanebula.com
karmanebula.com
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.
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.
That said, I don't use this anymore because I found that I rarely release escape (er, caps lock) before moving on to the next key. So I was getting a lot of control-n instead of <Esc>n.
https://github.com/Lokaltog/vim-easymotion
it's well worth a look, gives you super quick fine grained movement
similarly
inoremap jj <ESC>
to take you from INSERT mode to NORMAL mode is nice inoremap jk <ESC>
for a long time now, and it works like a charm.I tried it for a couple of days, maybe not long enough, and I guess a lot of this comes down to feel, which comes down to previous typing experience and personal preference, which seems that it may be highly personal (though I don't have data to back that up).
Sadly, not (sanely) with a Norwegian keyboard layout. We "only" have one key left of z, namely "<" (and with shift ">") -- and not really any keys right of "l" and "p" -- right home-row is "jklø" followed by "æ", and "å" is right of "p".
Way out in the cold by the enter key we have "'" (shift for "*"), and the not-so-useful composing '"' (and "^~" with shift/alt-gr respectively).
If only we could stick to something like romaji'zed Japaneze, we'd have plenty of keys left over! ;-)
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.
Leader is mapped to comma. Most of my leader commands are comma + "some letter I can type with my left hand".
You might want to try vim-sneak.
I'm guessing I use Ctrl-e more often than :e - perhaps I should change that up.
There seems to be a lot of ringing endorsements for CapsLock as Ctrl in the comments.
https://github.com/CGamesPlay/dotfiles/blob/master/files/vim...
I definitely stuck with the default vim bindings (and for the most part can switch back to them quickly) until I wanted to customize the experience to my preferences. There's definitely something to be said about keeping the stock bindings unchanged, if that's one's preference.
I started using Caps Lock as an extra Ctrl a couple months ago. It's great, except now I can't use other people's computers because I end up in caps-lock shout mode.
E.g. instead of "ctrl+l" in my browser to visit a site, it ends up:
CTRL+SHOUT+L BROWSER TAKE ME TO FACEBOOK I COMMAND THEE:map <Leader>W :w [some things you want to tack onto w]
The leader key is by default '\', so that's effectively mapping \W to :w [some things ...]
He's replacing his leader key with space.
http://learnvimscriptthehardway.stevelosh.com/chapters/06.ht...
I also fixed the display of the .vimrc file so you can see the "<Leader>" entries.