Sublime Forum

Support for Touch Bar (MacBook Pro 2016)

#1

Are there plans to include support for Apple’s new MacBook Pro with Touch Bar shown below:

Touch bar replaces the function key row with an OLED panel with multi touch support. It is fully customizable. Don’t know, how the API looks like. Basically that might provide shortcuts to frequently used commands/scripts.Or maybe show different tabs or open files for easy access. If you have suggestions, please list them to this thread.

6 Likes

Apple touchbar support
#2

Last 5 used files would be a great feature for me. Then you could switch faster between the files then with Ctrl Tab. Another great feature would be to easily add functions from Command Palette to the Touch bar, making them even faster to access.

Another feature that probably is harder to integrate would be the last 5 copied texts. Kind of an integrated copy board.

0 Likes

#3

Please, please add an API for this! All the stuff packages could do! There should be a way to resolve conflicts though. The same problem with conflicts between different packages exists with the gutter so this would not be something new. In any case, PLEASE give us an API.

2 Likes

#4

I agree that several APIs would be great. But I just wonder in which way these APIs should be like.

According to Apple’s announcement, the Touchbar actually is a screen with an independent CPU and thin WatchOS. Maybe we can customized TouchBar with a set of selected Commands (maybe syntax specific)?

0 Likes

#5

I wonder if this could be implemented using apps like Keyboard Maestro too? Since most (all?) Sublime features can be keyboard bound, so if not Sublime will offer it, maybe keyboard helper apps will?

EDIT: “The API for the Touch Bar does not appear to allow non-front applications to affect the Touch Bar, except that Apple does this themselves in Xcode and Screen Capture and the like. So Apple knows and understands the need, but have not made the facility available for Third Party macro trigger style applications.”

So I guess we’re left to hope that Sublime can integrate it then :slight_smile:

0 Likes

#7

I came across this thread, looking exactly for this feature. In my opinion, this should match the power of flexibility of sublime text.
We can imagine a file like sublime-keymap-touchbar, where you can simply add shortcut like the sublime keymap file, but with the possibility to add a label or an icon to display in the touchbar.
Or, for more power, A full plugin with advanced functionalities.
I dont have the 2016 macbook yet, it’s a matter of days, but as soon as I get it, I will look the touchbar API and see what can be done.
It could be good to start thinking what are the bests uses for sublime on the touchbar.

1 Like

#8

I frequently flip between full-screen and distraction free mode, so touch bar buttons to quickly change view mode would be welcome!

0 Likes

#9

It is a hardware specific feature (and also os-specific) so I doubt it would fit in a cross-platform API like ST’s. You are free to use the ctypes python package to access these OS APIs however.

Personally, I would create a package in a way that allows specifying arbitrary commands and arguments to be run on touch, and optionally a way to modify displayed text (or image?) for each button. Anything more custom should be directly implemented.

0 Likes

#10

Would love to see this.

0 Likes

#11

Why would Jon implement this for a small group of users? He won’t implement printing in ST which has been requested by a larger group of users, so you guys are beating a dead horse.

0 Likes

#12

We’re all developers - just a basic API would be enough, so we could program our own plugins for this.

Someone mentioned ctypes: any idea how difficult would it be to build a plugin using that?

0 Likes

#13

As of Dev buil 3132, there is now a “Basic TouchBar support on macOS Sierra”.

jps:

With regards to Touch Bar support on macOS, all you get out of the box is buttons for next/prev result (i.e., F4/Shift+F4 equivalents). You can enable the show_navigation_bar preference to turn on a list of recently visited files there, too. It’s off by default because it’s very much just an experiment at this stage: it needs some testing to see if it’s even useful.

0 Likes

#14

@Paapaa :information_source: The updated forum now lets you accept answers and/or mark a topic (=issue?) as resolved.

1 Like

#15

@rppn: I have no idea how to do it. Is it possible for old threads? There is not checkbox to accept an answer. (Or I’m just blind…)

0 Likes

#16

Comments can be selected as an answer from the left most icon which kinda looks like this :ballot_box_with_check:

0 Likes

#17

You can only accept an answer in the Technical Support category.

2 Likes

#18

This would be so fantastic, I’d love the option to assign macros or sublime functions to the touch bar.

1 Like

#19

This was added in Build 3143.

1 Like

#20

Oh! Fantastic - I’m surprised my searching didn’t find the docs for this - do you happen to have a link to them handy?

0 Likes

#21

See here.

0 Likes