I've been using jk for quite some time now. It's definitely my favourite improvement over stock vim. You can sort of roll your fingers with your right hand index and middle finger which makes it super fast.
The article mentions that you can set custom mappings to escape and uses this as an example:
imap jj <Esc>
If you're interested in doing that, I'd strongly recommend you never do a plain `imap` and instead always do `inoremap` (this advice applies to `nmap`, `vmap`, and the like as well). The difference is that the noremap variant is non-recursive [0].
Also, since we're on the subject of escape alternatives, I may as well mention mine. It really bothers me that exiting insert mode moves your cursor back a space. To remedy that, I've got a custom mapping that escapes and them jumps to the mark at which insert mode last was [1]. The mapping is:
I use alt-[keystroke], which changes to normal mode and executes [keystroke]. So if the first command I intend to execute in normal mode is simple, I get that plus the mode change in one keystroke. If the command is complicated, I just use alt-l (moves the cursor one space) which I find easier to hit than ctrl-[ or esc.
As a bonus, it works in readlines vi mode as well.
I'm surprised of no mention of mapping <esc> to <caps> -- it's such a sweet modification to Vim. I'd do it regardless of Apple's touchbar announcement.
I haven't done this because I'm trying to stop chording: pressing two keys simultaneously with the same hand. I'm pretty sure it causes RSI (try Googling chording and RSI).
When I have to type all caps, I find myself chording a lot. The alternative is to always use the right shift for capital letters on the left and vice versa, but that doesn't work well for all caps words. Therefore I'm trying to learn to actually use caps lock.
I use "kj" for escape, "lkj" for escape-and-save, and ";lkj" for escape-and-save-and-quit since I can roll my fingers faster that way that doing "jk" or "jj"
It also has the advantage of usually being a no-op in visual mode (kj moves up, then moves down). "jk" has the same advantage. Whereas "jj" will move you down.
"during insert, kj escapes, `^ is so that the cursor doesn't move
inoremap kj <Esc>`^
"during insert, lkj escapes and saves
inoremap lkj <Esc>`^:w<CR>
"during insert, lkj escapes and saves and QUITS
inoremap ;lkj <Esc>:wq<CR>
Off topic: I love vim and use it for everything from writing love notes to assembly. Lately I've picked up using Vue.js with the new .vue files using ES6. What code highlighting plugin have y'all successfully used for the JS/ES portion of the file that does highlighting well and doesn't just stop working if you scroll up and down in the file? It's driving me a little batty.
The stock Javascript stuff works all right for me. After just tracking down a problem I was having with indention that turned out to be a dumb line in my .vimrc, I'd suggest doing a standard troubleshoot - take out all of your extensions and your .vimrc and see if it still does it. If it stops, re-enable stuff until you figure out exactly what's causing the problem.
Ctrl-c and Ctrl-[ are my favorite -- once you remap caps lock to control (so that control is where it was when these interfaces were designed), you have a simple, 2-hand chorded escape with minimal stress on the keys.
Does anyone here remap backspace to something else? My right wrist has been particularly RSI sensitive in the last month or so and I've noticed that reaching for backspace tends to set it off.
Highly recommended for Linux or Windows desktop computers if you have RSI trouble. A bit unwieldy for laptops though. I use both and switching isn't a big issue (unlike switching national keyboards, which drives me crazy). It doesn't quite have enough modifiers for Mac - can't have both left and right versions of shift, alt, ctrl and command.
Vi users have to swap the up-arrow and the down-arrow since they use the same fingers as j and k, but reversed. However, it's pretty easy to remap, and it happens in the keyboard so it works everywhere.
[+] [-] K0nserv|9 years ago|reply
[+] [-] mpobrien|9 years ago|reply
[+] [-] falcolas|9 years ago|reply
http://www.economyofeffort.com/2014/08/11/beyond-ctrl-remap-...
[+] [-] Tempest1981|9 years ago|reply
[+] [-] _xhok|9 years ago|reply
[+] [-] unknown|9 years ago|reply
[deleted]
[+] [-] bilalq|9 years ago|reply
Also, since we're on the subject of escape alternatives, I may as well mention mine. It really bothers me that exiting insert mode moves your cursor back a space. To remedy that, I've got a custom mapping that escapes and them jumps to the mark at which insert mode last was [1]. The mapping is:
[0]: http://learnvimscriptthehardway.stevelosh.com/chapters/05.ht...[1]: http://vimdoc.sourceforge.net/htmldoc/motion.html#`^
[+] [-] EduardoBautista|9 years ago|reply
[+] [-] simplicio|9 years ago|reply
As a bonus, it works in readlines vi mode as well.
[+] [-] threatofrain|9 years ago|reply
[+] [-] ErikCorry|9 years ago|reply
When I have to type all caps, I find myself chording a lot. The alternative is to always use the right shift for capital letters on the left and vice versa, but that doesn't work well for all caps words. Therefore I'm trying to learn to actually use caps lock.
Admittedly it's not going very well
[+] [-] valbaca|9 years ago|reply
It also has the advantage of usually being a no-op in visual mode (kj moves up, then moves down). "jk" has the same advantage. Whereas "jj" will move you down.
I also have my caps-lock key mapped to escape.
(EDIT: learning from bilalq https://news.ycombinator.com/item?id=13101691)
[+] [-] red2awn|9 years ago|reply
[+] [-] cygned|9 years ago|reply
[+] [-] IgorPartola|9 years ago|reply
[+] [-] ufmace|9 years ago|reply
[+] [-] aeosynth|9 years ago|reply
I'm getting by with the stock html syntax:
[+] [-] oinksoft|9 years ago|reply
[+] [-] kough|9 years ago|reply
Does anyone here remap backspace to something else? My right wrist has been particularly RSI sensitive in the last month or so and I've noticed that reaching for backspace tends to set it off.
[+] [-] ErikCorry|9 years ago|reply
Highly recommended for Linux or Windows desktop computers if you have RSI trouble. A bit unwieldy for laptops though. I use both and switching isn't a big issue (unlike switching national keyboards, which drives me crazy). It doesn't quite have enough modifiers for Mac - can't have both left and right versions of shift, alt, ctrl and command.
Vi users have to swap the up-arrow and the down-arrow since they use the same fingers as j and k, but reversed. However, it's pretty easy to remap, and it happens in the keyboard so it works everywhere.
[+] [-] ibiza|9 years ago|reply
[+] [-] kough|9 years ago|reply
[+] [-] ErikCorry|9 years ago|reply
[+] [-] nikkisnow|9 years ago|reply
[+] [-] unknown|9 years ago|reply
[deleted]