visual-studio-codevscode-extensions

How to shorten or hide the search bar in VS Code?


I have used the Shortcut Menu Bar extension to create some shortcut icons in the menu bar. However, I have run out of space on the menu bar for icons; I still want to add 3-4 more shortcut icons. The search bar is taking up a very large amount of space on the menu bar (see picture below); is there a way to either (a) shorten it, or (b) hide it entirely?

enter image description here


Solution

  • The bar you're seeing isn't really a standalone "search bar" - it's the Command Center that VS Code introduced in recent versions. You can't actually "hide" it because VS Code doesn't allow you to manually resize that field - it's either visible or hidden. If you prefer a smaller UI, the best workaround is to hide it and just use the Command Palette shortcut:

    To hide it completely, you need to disable it in your settings.json:

    "window.commandCenter": false