Sublime Forum

Support for Touch Bar (MacBook Pro 2016)

#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

#22

Thanks but theres no information or links to documentation there, it only states “Mac: Added Touch Bar support” and that’s it from what I can see?

0 Likes

#23

Sorry, I don’t have a Mac, so I can’t help you. I would suggest that you consult your Mac documentation or the Apple support web site.

0 Likes

#24

It’s not macOS that I need documentation for though, it’s Sublime Text, it’s all good and well to say it ‘supports the touch bar’, but - what does it support? How do you configure Sublime to do things with it? It’s application specific.

0 Likes

#25

This article should help you. Pay attention to the section “From within Apps”.

0 Likes

#26

Thanks @jackeroo and sorry for the late response.

Perhaps I’m doing something wrong, but for some reason in SublimeText there doesn’t seem to be View -> Customise Touch Bar:

0 Likes

#27

I do however see this option in many other apps:

0 Likes