News for hackers. Stuff that matters.
Re:2016 Retina MacBook Pro Caveats by Tom1971 on Tuesday November 22, 2016 @12:39PM (#13015754)
While, over time, a lot of today's annoyances with the new Macabook's will fade away, the lack of ESC key is a deal breaker for me.

I tried it at the Apple Store and it's pretty much unusable. (It had the seen issue as the writer, apparently relying on the physical click to know whether or not I had pressed it. In addition, I also mistyped it a lot. Maybe hack to replace the whole touch bar as one single ESC key will do it...)

I've been told to remap the ESC to CAPS LOCK to vim usage, but I seem to be one of a rare breed who uses the latter the way it was intended to be, so that's a no go for me.

Re:2016 Retina MacBook Pro Caveats by Veen on Tuesday November 22, 2016 @12:49PM (#13015869)
> I've been told to remap the ESC to CAPS LOCK to vim usage, but I seem to be one of a rare breed who uses the latter the way it was intended to be, so that's a no go for me.

Not really relevant, but when Vi was originally developed, the escape key was in a more convenient location — right where the tab key is now. It was never intended for users to have to reach that far to hit such an essential key.

https://en.wikipedia.org/wiki/File%3aKB_Terminal_ADM3A.svg

Edit: also, Control-c and control-[ do the same thing.

Re:2016 Retina MacBook Pro Caveats by Lio on Tuesday November 22, 2016 @01:27PM (#13016204)
> Edit: also, Control-c and control-[ do the same thing.

They're not actually the same. C-[ is the same as Esc but C-c is not.

Using C-c to leave Insert mode won't trigger InsertLeave.

If you select a vertical visual block and insert a comma at the end of each line E.g. C-v}$A, Using Esc or C-[ to leave insert mode will insert the comma at the end of every line in the paragraph but using C-c will only insert after the first line.

Also if you get used then to using C-c in Vim then you'll potentially run into issues if you try to use it in other Vi places e.g. anything that uses readline or your shell.

IMHO C-[ is a much better solution for these reasons.

Re:2016 Retina MacBook Pro Caveats by CountSessine on Tuesday November 22, 2016 @01:42PM (#13016353)
You can get C-c to be pretty much identical with a little remap

:imap <C-c> <Esc>

Remapping caps lock would be good too, but I already have caps lock remapped to Ctrl and I'm just used to that. In anticipation of what seemed like the inevitable loss of my escape key, I've been trying really really hard to like Ctrl-[ the last three weeks, but I've just given up. I keep opening up Ctrl-P searches or hitting Ctrl-]. My pinky just can't do it. So I've given up and made Ctrl-C work and it's so much better.

Re:2016 Retina MacBook Pro Caveats by Lio on Tuesday November 22, 2016 @01:48PM (#13016399)
> You can get C-c to be pretty much identical with a little remap > :imap <C-c> <Esc>

True but you're still out of luck in other Vi like places.

As an alternative I used Karabina in the past to map Caps lock into Esc (when pressed and released) and Ctrl (when pressed with another key). I think you could also make it latch as Caps lock by using Caps-Shift but I'm not 100% on that.

Does anyone know if Karabina has been updated to work with Siera yet?

Re:2016 Retina MacBook Pro Caveats by pimlottc on Tuesday November 22, 2016 @03:34PM (#13017412)
I assume you mean Karabiner. Their page still has a notice that it doesn't work with macOS Sierra.

https://pqrs.org/osx/karabiner/

Re:2016 Retina MacBook Pro Caveats by Lio on Tuesday November 22, 2016 @06:32PM (#13018618)
I did mean Karabiner, thanks for the catch.

I've stayed El Capitan because I couldn't think of anything I found compelling in Sierra. I'll probably reconsider when Karabiner-Elements becomes a suitable replacement.

Re:2016 Retina MacBook Pro Caveats by CountSessine on Tuesday November 22, 2016 @02:02PM (#13016512)
True but you're still out of luck in other Vi like places.

Agreed. I use set -o vi in bash and of course my little remapping is of no use there.

As an alternative I used Karabina in the past to map Caps lock into Esc (when pressed and released) and Ctrl (when pressed with another key).

This was something else I had suggested to me, but while probably about 50% of my computer use on a daily basis is on OSX, the other 50% is linux; for all of xkb's data-driven flexibility, I'm not sure whether it can do something like this. And I can't afford to build muscle memory for something I can only use on one platform.

Re:2016 Retina MacBook Pro Caveats by emidln on Tuesday November 22, 2016 @04:05PM (#13017645)
It can. I've been using Caps Lock as Escape across Linux, FreeBSD, and OS X for 7 years now. The various gui interfaces to xmodmap even have an option to do the flip for you (at least in GNOME, Cinnamon, and KDE).
Re:2016 Retina MacBook Pro Caveats by CountSessine on Tuesday November 22, 2016 @05:25PM (#13018231)
I've been using Caps Lock as Escape

That's easy - what @Lio was talking about was having Caps Lock be a tap for <Esc> and then holding it with another key would be <C->. Is that what you're talking about? Karabiner can accomplish this on macOS, but I can't find a gconf/gsetting/xmodmap combination to do this on Linux. Caps Lock as Escape is easy. Caps Lock as Ctrl is easy. Caps Lock as both doesn't seem to be possible on Linux.

Am I wrong? Can you point me toward more info on this? I'd really appreciate it - I would so love to be able to use tap-for-escape in all readline contexts.

Re:2016 Retina MacBook Pro Caveats by Lio on Tuesday November 22, 2016 @06:25PM (#13018591)
That is exactly what I meant.

The worry about building up muscle memory around something not portable is exactly what lead me to force myself to use C-[ as Escape too.

Re:2016 Retina MacBook Pro Caveats by rdslw on Tuesday November 22, 2016 @02:19PM (#13016690)
I aslo remap caps to ctrl everywhere.

For vim, you can map tab to being your new esc. Chances are you are using expandtab option, so actual tab usage is not big (it exists though, left here as an exercise for a reader )

Anyway im moving to kabylake dell xps 13. After 9 years with apple. Windows from 2016 gives much better linux integration. And its good to challenge yourselfe with such a big change every 10 years. Its bicycle for your mind (c) Jobs.

Re:2016 Retina MacBook Pro Caveats by Lio on Tuesday November 22, 2016 @06:50PM (#13018726)
If you did remap tab to Escape in Vim you could still use C-i for tab as an alternative.

Other neat insert mode shortcuts include C-h for Backspace, C-m for Return and indent/outdent with C-t and C-d.

Re:2016 Retina MacBook Pro Caveats by CountSessine on Tuesday November 22, 2016 @02:45PM (#13016952)
In addition to considering a 2015 MBP refurb, I am also thinking about an XPS 15.

I find Windows 10 to be an enormous improvement over 7 and 8; they finally fixed some of the stupid little things that have been issues since NT 3.1. Like the awful terminal emulator or the dialog box for editing environment variables. It seems like Microsoft is finally being run by someone who cares about details.

Re:2016 Retina MacBook Pro Caveats by oneeyedpigeon on Tuesday November 22, 2016 @02:40PM (#13016900)
> I seem to be one of a rare breed who uses the latter the way it was intended to be

I am intrigued; what's your use case that requires so much uppercase text?

Re:2016 Retina MacBook Pro Caveats by Tom1971 on Tuesday November 22, 2016 @06:05PM (#13018473)
Work: a metric ton of #defines that are generated by our hardware register addressmap generator, as well as a very particular file naming convention, which has a heavy mix of uppercase.
Re:2016 Retina MacBook Pro Caveats by aabajian on Tuesday November 22, 2016 @01:36PM (#13016299)
I actually think this is very relevant, just unknown! It's something I always wondered about Vi, the ESC key is just out of reach of the home row, making it a strange choice for a fundamental operation.
Re:2016 Retina MacBook Pro Caveats by Tom1971 on Tuesday November 22, 2016 @06:06PM (#13018479)
Yes, the old Apollo HP workstations (on which I initially learned vi before it became vim), ESC close to the left shift. Very convenient.
Re:2016 Retina MacBook Pro Caveats by nilkn on Tuesday November 22, 2016 @12:42PM (#13015784)
Following the lead of Spacemacs I remapped Esc in vim to "fd". It works surprisingly well and is extremely easy and fast to type.
Re:2016 Retina MacBook Pro Caveats by randlet on Tuesday November 22, 2016 @12:54PM (#13015917)
I use jk to exit from insert mode, but you still need an escape key to cancel actions when entering commands. For example if I type :wq and decide I actually don't want to quit, I still need to hit Esc to cancel. It would be nice if :wqjk (or :wqfd) would allow you to cancel but I don't think that's possible is it?
Re:2016 Retina MacBook Pro Caveats by shadytrees on Tuesday November 22, 2016 @01:11PM (#13016058)
very possible! :cnoremap jk <C-C>
Re:2016 Retina MacBook Pro Caveats by randlet on Tuesday November 22, 2016 @01:37PM (#13016310)
Whoo! Thank you very much!
Re:2016 Retina MacBook Pro Caveats by kaizensoze on Tuesday November 22, 2016 @12:57PM (#13015937)
I've always found Ctrl-[ to be more intuitive instead of ESC for vim. Strangely enough I have no idea where I saw that Ctrl-[ works as an alternative and I don't see any reference to it in my vimrc so it should work out of the box. Having to move your left hand all the way over to esc is just slow and cumbersome, meanwhile [ is just right there.
Re:2016 Retina MacBook Pro Caveats by city41 on Tuesday November 22, 2016 @01:39PM (#13016323)
^[ is what ESC sends to a terminal, so CTRL-[ and ESC are equivalent.
Re:2016 Retina MacBook Pro Caveats by Tom1971 on Tuesday November 22, 2016 @06:08PM (#13018489)
I tried that at the Apple Store.

It's an option.

But there are so many programs that require ESC, so it's only a half-way solution.

Re:2016 Retina MacBook Pro Caveats by wcarron on Tuesday November 22, 2016 @02:05PM (#13016550)
I remapped my ESC key to `jj`. Set the timeout to 1 sec and it's been working flawlessly for me.
Re:2016 Retina MacBook Pro Caveats by r00fus on Tuesday November 22, 2016 @02:28PM (#13016785)
Where did you remap?
Re:2016 Retina MacBook Pro Caveats by wcarron on Wednesday November 23, 2016 @05:57PM (#13026474)
in a .vimrc file. https://github.com/Wompii/Vim/blob/master/vimrc

Just clone it into your root directory and ensure it's named ".vimrc". It won't work otherwise. Then just restart your terminal. I'd google some things in there if you don't fully understand what they do.

Re:2016 Retina MacBook Pro Caveats by Caballera on Tuesday November 22, 2016 @12:48PM (#13015845)
The escape key is still there, it's on the Touch Bar, I have no issues with using it, and I haven't had to re-map it. Also you can hit the 'fn' key and the 'Function' bar and escape key will appear while using any other 'app' that changes the Touch Bar.
Re:2016 Retina MacBook Pro Caveats by 51Cards on Tuesday November 22, 2016 @01:03PM (#13015985)
The prime issue is lack of tactile feedback. I wrote quite a bit about this in a previous comment, in that we "touch type" because we get feedback from our fingers. Implementing a "keyboard" interface that requires a change of visual focus is not a good UI practice.
Re:2016 Retina MacBook Pro Caveats by eridius on Tuesday November 22, 2016 @04:35PM (#13017887)
In your comment 25 days ago, you stated that the problem is the layout of the Touch Bar changes regularly, therefore you need to look at it. But this doesn't make sense for the Esc key, because the Esc key is always in the same place on the Touch Bar (and is always available while you're typing).
Re:2016 Retina MacBook Pro Caveats by 51Cards on Wednesday November 23, 2016 @12:09AM (#13020229)
To me there are a couple problems. One is the changing layout as I mentioned and the fact you have to shift focus constantly because you can't feel where things are (esp since they change from app to app). Then secondly the lack of feedback. I wouldn't mind the touch-bar so much if it hadn't replaced keys that some people use constantly. As an add on above the keyboard, sure... while I wouldn't be crazy about it it could be handy for some people. But half the comments talk about how you can re-map keys to work around it... and that to me spells UI downgrade. A fair percentage of people are perceiving this as enough of a loss in functionality they are finding work arounds.
Re:2016 Retina MacBook Pro Caveats by eridius on Wednesday November 23, 2016 @02:46PM (#13025264)
I'm willing to bet that most people complaining about it and talking about remapping it haven't actually used the Touch Bar yet.
Re:2016 Retina MacBook Pro Caveats by Lio on Tuesday November 22, 2016 @01:32PM (#13016258)
Does it toggle or is only when the fn key is held?

If it's only whilst the key is held it effectively means you'd have to use your right hand to press the escape key ...which doesn't sound ideal to me.

Re:2016 Retina MacBook Pro Caveats by eridius on Tuesday November 22, 2016 @04:43PM (#13017928)
Esc is always available while you're typing (and usually available when you're not). Holding Fn is for getting at the F-keys, not for getting at Esc (though it can be used for getting at Esc too if you're in a context that normally hides that key).
Re:2016 Retina MacBook Pro Caveats by sergiosgc on Tuesday November 22, 2016 @01:09PM (#13016044)
I have a Lenovo x1c with an oled touch bar. In the x1c it has function keys. It's a terrible solution. No tactile feedback is a deal breaker.

Lenovo backtracked, and subsequent generations lost the "touch bar" and use regular keys.

Re:2016 Retina MacBook Pro Caveats by r00fus on Tuesday November 22, 2016 @03:02PM (#13017133)
Implementation details matter. This is one area where Apple has often excelled where others have failed.
Re:2016 Retina MacBook Pro Caveats by khedoros1 on Tuesday November 22, 2016 @03:51PM (#13017540)
The touchpad is a good example here. I've got an HP with a large touchpad, and with the buttons implemented in software. It's horrendous to use in a situation where I'm mixing left and right clicks, while expecting the cursor to stay in one place (games, file management in the GUI).

I don't use Macs often, but that's definitely one place where Apple is so far ahead in their implementation that it's not even funny. Using the touchpad for anything more complex than surfing the web is much more comfortable.

Re:2016 Retina MacBook Pro Caveats by hackcrafter on Tuesday November 22, 2016 @01:03PM (#13015988)
I've been wondering about this.

Does the 'fn' key force-change the touchbar to display F1-F12?

If so, then I don't understand the folks bemoaning the lack of physical "function keys" from their apps, which I assume they mean that they use the F(n) keys, since the mechanics of this are the same.

I'm a fast touch typist, but have never have hit F(n) keys accurately without glancing at the keyboard when I do use them, so I assume I would have no problem with the TouchBar based F keys.

Re:2016 Retina MacBook Pro Caveats by kfinley on Tuesday November 22, 2016 @01:20PM (#13016156)
> Does the 'fn' key force-change the touchbar to display F1-F12?

Yes it does

Re:2016 Retina MacBook Pro Caveats by vszakats on Tuesday November 22, 2016 @02:01PM (#13016511)
Is it possible to set it [1] to display F keys by default (and switch to alternate functionality only on pressing Fn key)?

[1] System Preferences > Keyboard > Keyboard > "Use all F1, F2, etc. keys as standard function keys" option on El Cap.

Re:2016 Retina MacBook Pro Caveats by eridius on Tuesday November 22, 2016 @04:55PM (#13018016)
No. You can set the Touch Bar to show, by default, "App Controls with Control Strip", "Expanded Control Strip", or "App Controls". And you can change Fn so it shows "Expanded Control Strip" instead of the F-keys (e.g. if you never need F-keys). But you can't set the Touch Bar to default to F-keys and require Fn to do something else.
Re:2016 Retina MacBook Pro Caveats by oneeyedpigeon on Tuesday November 22, 2016 @02:38PM (#13016868)
Was it not a problem getting used to it being in a different position? How do you find pressing a key with no physical presence - do you have to look down at it, or are you just used to it now?