News for hackers. Stuff that matters.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by geofft on Friday October 28, 2016 @12:29PM (#12817741)
What do you use to get out of insert mode? Like, you've just finished typing some text and want to save and quit, what do you press?

EDIT: Thanks for the replies, other people. I personally use ^C, I was curious what 'mozumder specifically used. :)

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by falcolas on Friday October 28, 2016 @12:37PM (#12817837)
The usual answer is 'C-[' or 'kj' (having added the appropriate line to your .vimrc).
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by eeeeeeeeeeeee on Friday October 28, 2016 @03:18PM (#12819705)
Which is fine if you do everything locally (because you control that configuration), but not having escape really sucks when you are on servers a lot and you can't necessarily go changing vim settings around.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by JoshMnem on Friday October 28, 2016 @04:28PM (#12820328)
It's also difficult when using programs that emulate Vim's keybindings, because they tend to only use ESC by default.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by falcolas on Friday October 28, 2016 @04:31PM (#12820351)
C-[ is available by default; it's the actual control sequence sent by escape in many terminals.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by palunon on Friday October 28, 2016 @12:38PM (#12817848)
CTRL-[ (of course if you're not using a QWERTY keyboard, it may be hard to hit)
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by biot on Friday October 28, 2016 @12:49PM (#12817988)
I don't know why that would be anyone's preference given that if you used telnet to connect to a remote shell, ^] is the default escape character. So using ^[ to exit input mode is dangerously close to popping you out of your telnet session. Someone who claims to have used vi for 25+ years (get off my lawn, ssh didn't exist back then) would have likely used telnet and been bitten by that more than once.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mst on Friday October 28, 2016 @01:20PM (#12818364)
I didn't switch to Ctrl-[ until sufficiently recently that anything I'm running vi-ish things on is over ssh.

I will, however, never forgive Excel for Esc being "abandon edit".

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by messe on Friday October 28, 2016 @12:44PM (#12817924)
I have `jk` mapped to that in my vimrc. It's far nicer than ESC.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by greendragon on Friday October 28, 2016 @01:04PM (#12818167)
I love jk, been using that one for at least 8 years. I even got in the habit of tapping it a few times while thinking, sort of like how you might sometimes shake your leg or whatever. I trained myself off of that though when I had to use Eclipse more and more -- edits or undoes to a file can bring Eclipse to its knees....
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by pjonesdotca on Friday October 28, 2016 @12:52PM (#12818025)
I have 'jj' mapped to ESC.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mozumder on Friday October 28, 2016 @12:36PM (#12817824)
Ah, I see. I didn't even consider that a function command.

I was expecting more commands to use the ESC key?

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by geofft on Friday October 28, 2016 @12:52PM (#12818028)
Yeah, I'm not sure I'd even call it a command - but it is pretty fundamental to vi usage, unless you're using some alternative like ^C or the "remap typing 'jk' to Esc" trick. When you're saying you've never used the Esc key, you mean you only use the Esc key to take you out of insert mode, I guess?
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mozumder on Friday October 28, 2016 @01:11PM (#12818258)
Yes. I do use ESC that to exit insert mode. Sorry for any confusion.

I was expecting commands to be anything you did after the typing in colon.