5 ms·
The "kj" remapping seems like a nifty trick; I've spent a while getting accustomed to ctrl-[ instead of the <ESC> key (I can't reach the <ESC> key without movi
by willwagner 16y ago
The "kj" remapping seems like a nifty trick; I've spent a while getting accustomed to ctrl-[ instead of the <ESC> key (I can't reach the <ESC> key without moving my left hand), but it's still hard for me to do quickly and reliably.
- latortuga 16y agoThe author of the article suggests using Caps lock as control but I've found it's a stellar place to have an escape key. After a few days it felt completely natural for my left pinkie to hit escape. For those on windows, there are a number of batch files that will help edit your registry to remap the keys although I found it to be a problem on Windows 7 until I tried Sharp Keys which worked great. Another trick that is useful for people who compulsively hit the Ctrl+s keybind from other editors; the following is from my vimrc: " Map Control+s to save a file nmap <C-s> :w<CR> imap <C-s> <ESC>:w<CR> This leaves you in normal mode which is usually what I want when I hit ctrl+s.
- pyre 16y agoDon't hit C-s when you're using vim in a terminal though. (But if you do, hit C-q)
- latortuga 16y agoI actually almost put this in my original post but I didn't know if this was just our server's vim install or if it applied generally. Thanks for the heads up!
- zieski 16y agoFor insert mode I switched to using <C-O> instead of <Esc> after reading that it only enters normal mode for 1 command. That way I stay in whatever mode I was in when I saved.