4 ms·
Another excellent trick I read somewhere is to map 'jj' or 'jk' to esc when in insert mode (so 'inoremap jj <ESC>'). As a digraph they never occur in a natural
by cgmorton 15y ago
Another excellent trick I read somewhere is to map 'jj' or 'jk' to esc when in insert mode (so 'inoremap jj <ESC>'). As a digraph they never occur in a natural language, so you'll never type it accidentally. And you can hit it on the home row easy-peasy.
Although personally I type in Colemak, I still use this, just with 'yy' instead. To be honest, it's a barely noticeable slow-down but it's much less stressful for my hands.
There are really a lot of ways to do this. See: http://vim.wikia.com/wiki/Avoid_the_escape_key http://vim.wikia.com/wiki/Avoid_the_escape_key
- mgedmin 15y ago> As a digraph they never occur in a natural language I wonder how Dijkstra would react to that statement.
- aptwebapps 15y agoOr all those people whose handle is JJ?
- comex 15y agohttp://en.wikipedia.org/wiki/Hajj http://en.wikipedia.org/wiki/Hajj
- jedbrown 15y agoIt's common to use double letters (ii, jj, kk) as inner indices when writing tiled multi-dimensional array code. Regardless of whether you think that is a good convention, you should be preserving that convention if you are editing legacy code that was written that way.