Activity Bar width in Visual Studio Code

后端 未结 5 1820
长发绾君心
长发绾君心 2021-02-03 23:01

Is there a way to selectively change the width of the Activity Bar in VSCode (v. 1.14)? I have a 1366×768 screen where every pixel counts, so I would like to make this bar narro

相关标签:
5条回答
  • 2021-02-03 23:16

    EDIT (03/03/20): You can also use the customize-ui addon that allows more fine-grained font sizes and other goodies


    You can also use the negative zoom trick in settings.json:

    {
      "window.zoomLevel": -1,
      "editor.fontSize": 13,
      "terminal.integrated.fontSize": 16,
    }
    

    The whole editor will get smaller so you need to compensate editor.fontSize and terminal.integrated.fontSize

    This allows for smaller activity bar (unfortunately it acts on everything (icons size, font-size ...)) but I much prefer this than the defaults.

    0 讨论(0)
  • 2021-02-03 23:18

    Not solving your exact question but another good solution...

    • Install the Customize UI extension.
    • In your settings.json add "workbench.useExperimentalGridLayout": true,.
    • In Settings (UI) go to the Customize UI settings and set Activity Bar to "bottom".
    • Completely close VSCode and reopen.

    0 讨论(0)
  • 2021-02-03 23:25

    I recommend the excellent extension Activitus Bar. It recreate the activity bar buttons on the status bar:

    Then, you just hide this enormous, gigantic activity bar. Happying code!

    0 讨论(0)
  • 2021-02-03 23:28

    Wanted to add more to Akelian answer:

    On Windows/Linux - File > Preferences > Settings
    On macOS - Code > Preferences > Settings

    {
      "window.zoomLevel": -1,
      "editor.fontSize": 13,
      "terminal.integrated.fontSize": 16,
      "workbench.activityBar.visible": false,
    }
    

    Setting false to "workbench.activityBar.visible" removes the sidebar completely

    https://code.visualstudio.com/docs/getstarted/settings

    0 讨论(0)
  • 2021-02-03 23:39

    Not exactly what was asked, but instead of hiding it completely, I added a keyboard shortcut to be able to toggle the bar.

    On macOS: Code > Preferences > Keyboard shortcuts > search for: Toggle Activity Bar Visibility

    On Linux: File > Preferences > Keyboard shortcuts > search for: Toggle Activity Bar Visibility

    Alternatively, you can get to Keyboard shortcuts by pressing ctrl + k and then ctrl + s.

    I set it to Option + B just like Command + B for the Side Bar toggle and show it just when I need something there.

    0 讨论(0)
提交回复
热议问题