5 ms·
I agree about accepting (most) standard key bindings, but here are two clever bindings I adopted: " Enter command mode with SPACE instead of : noremap <Spa
by cpeterso 15y ago
I agree about accepting (most) standard key bindings, but here are two clever bindings I adopted:
" Enter command mode with SPACE instead of :
noremap <Space> :
" Exit insert mode with jj (double J) instead of ESC
imap jj <Esc>
- finnw 15y agoI use backspace as a substitute for ESC. I find ESC awkward to locate while typing, but backspace is easy.
- tednaleid 15y agoI used jj for a while as well, but once I found out that ctrl-C did the same thing out of the box, that became my "esc" key> (it's also important to remap caps lock to control, on the mac its easy: System Preferences->Keyboard->Keyboard->Modifier Keys)
- graywh 15y agoNote: that isn't exactly the same--using Esc will trigger InsertLeave autocommands, Ctrl-C will not.
- t-crayford 15y agoimap <c-c> <esc> Now it does.
- edanm 15y agoAs graywh says, ctrl-c is not the exact same as escape. If you want something standard which is, try ctrl-[. Harder to type, I know.
- NARKOZ 15y agodon't forget about: let mapleader = "," it remaps <leader> to ',' instead of '\'
- lywald 15y agoWhat about changing hjkl movements to jkl;? I didn't try it yet... But hjkl bothers me. My index belongs on j, for homerow touch typing, not h. Wouldn't it be an improvement? Not having to move the hand for movements. I must be missing something because everyone stays with hjkl.
- edanm 15y agoThe keys I use most are up/down. I tend to move between lines more often than I move between characters. This is true in any editor, but especially in vim, since I almost never move between individual characters, but rather use [w]ord movement commands, or [f] commands, etc. That's why it makes sense that my strongest fingers are on the up/down motions, whereas to move to the left, a movement I never make, is off to the side. Also, I wouldn't remap it for practical reasons - hjkl is a standard implemented in many places.
- t-crayford 15y agoI'm much faster in vim since I gave up (for the most part) on hjkl (arrow keys are banned for obvious badness). / ? # * combined with f and t are so much faster. The only time I use j/k is 10j/10k for looking through files. Hence, your question is somewhat misguided ;)
- johntyree 15y agoAnd what country is your keyboard from? Unless you mean you specifically use search for every motion...?
- t-crayford 15y agoI use colemak now, but this holds true in qwerty as well (most of the time). I don't use search for EVERYTHING, just most of the time it's faster.
- stevelosh 15y agoI did this for about two months before switching back to hjkl. There are two reasons why I switched back: * I like using "Ctrl+Direction" to move around splits, and mapping Ctrl+; on a Mac doesn't work without some Keyremap4Macbook trickery. It's a pain to get working. * Tons of other stuff uses Vim bindings, and you can't usually remap keys in most other programs.