News for hackers. Stuff that matters.
Re:Emacs and Vim by Touche on Friday July 25, 2014 @08:25AM (#8084804)
What key do you press in Vim more often than any other? Esc! Not on the home row (although I'm sure you'll say you remap it to tab).
Re:Emacs and Vim by lepton on Friday July 25, 2014 @09:40AM (#8085085)
Esc is also C-[, and if you've mapped Control to the home row (eg, swapped with CapsLock) then it's not so bad either.
Re:Emacs and Vim by vitalique on Friday July 25, 2014 @08:32AM (#8084826)
If you remap Esc to jk you don't even have to lift your fingers.
Re:Emacs and Vim by vacri on Friday July 25, 2014 @09:17AM (#8084993)
Another common one is Capslock.
Re:Emacs and Vim by vutekst on Friday July 25, 2014 @10:59AM (#8085524)
Mapping capslock to be esc is what made vim possible for me.
Re:Emacs and Vim by calvins on Saturday July 26, 2014 @11:19AM (#8089895)
Agreed. I don't know how anybody could use vi with escape unmapped. It's also very useful outside vi though, since esc is the default 'cancel' key in many cases. For example, most browser dialogs (and keyboard-navigable menus) can be closed with esc, and it works for many desktop dialogs too (at least on Linux).
Re:Emacs and Vim by splawn on Friday July 25, 2014 @11:13AM (#8085609)
Im too lazy to move two fingers for that, instead mine is mapped to jj. =P
Re:Emacs and Vim by Touche on Friday July 25, 2014 @08:45AM (#8084865)
What is jk?
Re:Emacs and Vim by vitalique on Friday July 25, 2014 @09:07AM (#8084958)
Just key 'j' followed by 'k'. I have this in my vimrc for quickly jumping out of insert mode: inoremap jk <ESC>
Re:Emacs and Vim by Touche on Friday July 25, 2014 @09:18AM (#8084997)
To each his own. I'm very fluid with my esc key hitting. I find it to be a very satisfying motion.
Re:Emacs and Vim by sozforex on Friday July 25, 2014 @09:09AM (#8084962)
imap jk <Esc> In insert mode. First press j, in the same second press k.
Re:Emacs and Vim by dozzie on Friday July 25, 2014 @04:37PM (#8087512)
Esc? Not quite. C-c mostly. It differs sometimes from Esc, but rarely enough for me not to care.
Re:Emacs and Vim by tomsthumb on Friday July 25, 2014 @09:57PM (#8088617)
I haven't pressed the escape button in the past few years using vim. Do something like `imap lkj <ESC>` and `vmap lkj <ESC>`. It's way nicer.
Re:Emacs and Vim by adlpz on Friday July 25, 2014 @09:15AM (#8084982)
Remap to tab? Insanity!

I remap it to Caps Lock of course.

Re:Emacs and Vim by graywh on Friday July 25, 2014 @04:04PM (#8087335)
Where the Tab key is now is where the Escape key was on the system Bill Joy developed Vi.
Re:Emacs and Vim by Touche on Friday July 25, 2014 @09:18AM (#8085000)
Ah, right, I forgot what the common remap was, thought I'd get that wrong, thanks for the correction.
Re:Emacs and Vim by Crito on Friday July 25, 2014 @09:32PM (#8088512)
The more common remap is probably capslock->ctrl, for both vim and emacs users, I but I definitely prefer capslock->escape. During normal operation, my left pinky rides the gap between a and escape(aka capslock). Pressing either requires the slightest of deflections to the left or right.

I keep escape as escape as well. Capslock is absolutely worthless to me.

Re:Emacs and Vim by delackner on Saturday July 26, 2014 @01:35AM (#8089011)
Or use PCKeyboardhack and I forget the other plugin but on a Mac, I have a brief caps lock mapped as esc, but holding it is control. it works effortlessley.
Re:Emacs and Vim by Crito on Saturday July 26, 2014 @11:30PM (#8091871)
On my chromebook pixel, there is a super/windows key (labeled as a "search" key) where the capslock normally is on a US keyboard. Since I use super as the prefix key for all of my window manager shortcuts, I use xcape (https://github.com/alols/xcape) to allow that key to function both as super (if I hold it down) and as escape (if I tap it).

These sort of systems are a great way to remap keys; I wish such remapping was exposed by operating systems in a nice stock way.