5 ms·
I prefer caps lock to Control. ^C does the same thing as escape in Vi[m]. While it is chording, the combo is pretty easy to hit. This is a bit of a compromis
by keenerd 15y ago
I prefer caps lock to Control. ^C does the same thing as escape in Vi[m]. While it is chording, the combo is pretty easy to hit.
This is a bit of a compromise, but all the other programs that are not vim will benefit from it.
- cgmorton 15y agoAnother 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.
- mtts 15y agoNever knew that Ctrl-C does the same thing as escape. Thanks for the info!
- ulisesrmzroche 15y agoThey're not exactly the same thing, actually, ctrl-c doesn't allow you to expand abbreviations and doesn't trigger the InsertLeave autocommand, but to be honest, I don't think it's that big of a deal. I go between ctrl-c and ctrl-] without thinking.
- no_more_death 15y agoAnother issue: if you ever use Ctrl-C in a macro, and then try to rerun it, the macro ends on Ctrl-C. I use ^[ to end insert mode. This only happens when you use macros like I do. I took a look at my registers and here's a random one I did four months ago (using Surround.vim to wrap an indented area in div tags). V/^[ ]\{0,2}[^ ]/-1^MS<div class="question"^M
- tathagatadg 15y agoLife changes. Yet again. Thank you, thank you ..