'How to customize the touch bar in visual studio code?

Looking in the conventional place: View -> Customize Touch Bar... The option is not present. Is this option not currently available? I'd like to disable most of the options it provides is where I am going.

I continually accidentally press the Forward and Back buttons while editing and it has become annoying very quickly.

I figured I would ask while I attempt update my finger muscle memory.



Solution 1:[1]

I kept running into this issue as well and it was quite frustrating. I appreciate the ability to customize via an extension, but I really like the drag-and-drop mechanism provided universally (or nearly) that is missing here.

As a result, I ended up disabling the touch bar within VS Code by going to:

Code -> Preferences -> Settings

and then:

Application -> Keyboard

There you will find the checkbox for enabling/disabling the touch bar on macOS. Hope this helps someone else discover it quickly!

Solution 2:[2]

I just ended up making it always show function keys:

https://support.apple.com/en-us/HT207240

Effectively:

System Preferences -> Keyboard -> Shortcuts Tab

At the bottom of the left pane, you will see Function Keys select that. On the right hand side you can +/- apps you want to always show the function keys.

Solution 3:[3]

You could check out the Nasc VSCode Touchbar extension

Customisable Mac touch bar

It allows you to choose from a bunch of preset commands by updating your settings.json to toggle buttons on/off

There are some other extensions you can try out that have come out since time of this post's publishing: https://marketplace.visualstudio.com/search?term=touchbar&target=VSCode&category=All%20categories&sortBy=Relevance

eg

{
    nasc-touchbar.goToDefinition: true,
    nasc-touchbar.goToNext: false,
    // ..etc
}

And if you're game you can write your own.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matt Ray
Solution 2 AJ Venturella
Solution 3