News for hackers. Stuff that matters.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mozumder on Friday October 28, 2016 @12:09PM (#12817507)
Same. Been using vi as my primary command-line editor for 25+ years, and have never used the ESC key, and just use the default setup.

I don't even know what commands would use the ESC key?

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by zzzcpan on Friday October 28, 2016 @12:12PM (#12817544)
ESC key is the default in vim, most vim users do use it.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mgkimsal on Friday October 28, 2016 @12:16PM (#12817589)
Thanks for some sanity.

The other anecdote is I've been using vim for about 15 years, and use esc daily. I am constantly in multiple vim environments - different servers, different clients, different OS, etc. I don't have the luxury of saying "I'm going to install all my default vim keybindings and plugins on every vim installation I ever use". Walking someone else over the phone who has to do vim - I need to count on some standard defaults being there, and 'esc' is one.

So yeah - some of you "power users" - fine - you've never touched ESC in 20 years - good for you. You're in the minority.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mdemare on Friday October 28, 2016 @12:35PM (#12817810)
There are several built-in ways to get from insert mode to normal mode in vim, only one of which has now been removed.

Vim users that use escape to leave insert mode are not exactly a majority of Mac users. Also, many people have been complaining about the location of Escape for such an important command. http://stackoverflow.com/questions/4416512/why-use-esc-in-vi...

Having said that, I use Escape myself in Vim - you know what? I'll adapt.

This has nothing to do with the new MBP being unsuitable for developers. This is about power users being forced to abandon ingrained habits.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by dunham on Friday October 28, 2016 @01:00PM (#12818125)
I've been using vi for over 20 years, but not a power user or anything (emacs for code, vi for quick edits), and have no idea how to use it without esc. Did vim change something? How do you switch modes?
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mst on Friday October 28, 2016 @01:16PM (#12818324)
Ctrl-[ == Esc. I had to learn Ctrl-[ three years or so back due to bluetooth keyboard paired with tablet and insufficient time to troubleshoot why Esc wasn't working, and then discovered that it's actually easier on my wrists to use Ctrl-[ and never went back.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by comex on Friday October 28, 2016 @12:41PM (#12817874)
You don't need to customize your vim keybindings if you map Caps Lock to ESC at the OS level, which is a builtin preference as of macOS 10.12.1.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by st3v3r on Friday October 28, 2016 @01:26PM (#12818441)
I'd have to say that your use case is in the minority too.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mgkimsal on Friday October 28, 2016 @02:20PM (#12819110)
just matching anecdote for anecdote...
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by palunon on Friday October 28, 2016 @12:36PM (#12817830)
Isn't ctrl-[ default on vim too ?
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by pherq on Friday October 28, 2016 @12:49PM (#12817987)
No, it's just a property of ASCII that (ctrl [) = (0x9f & 0x5b) = 0x1b = esc.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by sksksk on Friday October 28, 2016 @12:45PM (#12817943)
I use vim, I just assumed that when you open Terminal, a virtual escape key would appear in the touch bar. It'd still be in the corner, so fitts law would still apply, and it'd be easy to find.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by collinmanderson on Friday October 28, 2016 @05:49PM (#12821051)
Yes, this is what I assumed too. Is there any proof that this isn't the case? I'm not sure what the worry is about.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mozumder on Friday October 28, 2016 @12:25PM (#12817702)
For what commands? I'm trying to look up vim commands that would use the ESC key, and I only see one: https://www.fprintf.net/vimCheatSheet.html#select http://tnerual.eriogerg.free.fr/vimqrc.html

I'm not even a power user, & after 25 years, I just know the basic few commands that you need to do anything - insert, delete, search/replace, save, & quit.

I feel like I'm taking crazy pills!

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by Falcorian on Friday October 28, 2016 @12:34PM (#12817799)
ESC is the key that (roughly) takes you back to normal mode from insert mode, visual mode, etc. If you aren't using it, then you're either using one of the other ways to get back to normal mode (like CTRL-[), or you are using Vi in a very non-standard way.

See, for example: https://en.wikipedia.org/wiki/Vi#Interface

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by blowski on Friday October 28, 2016 @12:34PM (#12817803)
To switch modes from insert back to normal mode. I assumed ESC was the second key any Vim user used, just after `i`.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by bitbiter on Friday October 28, 2016 @12:37PM (#12817835)
From the docs: http://vimdoc.sourceforge.net/htmldoc/insert.html#i_%3CEsc%3...

End insert or Replace mode, go back to Normal mode. Finish abbreviation.

Note: If your <Esc> key is hard to hit on your keyboard, train yourself to use CTRL-[.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by biot on Friday October 28, 2016 @12:34PM (#12817796)
Are you talking about the same editor? From a 1996 vi man page [0]:

  There are commands that switch you into input mode.
  There is only one key that takes you out of input mode,
  and that is the <escape> key. (Key names are written
  using less-than and greater-than signs, e.g. <escape>
  means the ``escape'' key, usually labeled ``esc'' on
  your terminal's keyboard.)  If you're	ever confused 
  as to which mode you're in, keep entering the <escape>
  key until vi beeps at you.
[0] http://www.sbras.ru/cgi-bin/www/unix_help/unix-man?vi
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mst on Friday October 28, 2016 @01:18PM (#12818349)
Ctrl-[ == Esc.

I'm a happy user of http://ex-vi.sf.net/ and can confirm that, since it's the exact same key code, it works -fine-.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by JoshMnem on Friday October 28, 2016 @04:26PM (#12820302)
That alternative doesn't work in many programs that use vim keybindings. Ctrl-c doesn't usually work as an alternative outside of vim either.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by hashhar on Saturday October 29, 2016 @09:58AM (#12823949)
That's only true for a terminal. Programs built on electron don't behave the same way with vim emulation plugins.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by marrs on Tuesday November 01, 2016 @09:39AM (#12845586)
Map Caps-Lock to Esc?
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.