I disabled the activity bar (the leftmost panel with shortcuts buttons).
When I search for something the search results shown in side bar, replacing the file explorer. When I'm done with the search - how can I close the search results and see the file explorer bar again?
Given that there's no activity bar with the file structure bar shortcut on it? I tried clicking escape but the file results won't disappear. There's not even a button to close it.
Press CTRL + SHIFT + E.
I assume that you see something like this when you realize a search:
You can go back to the Explorer sidebar on two different ways:
Ctrl+Shift+E
shortcutAfter pulling up search with Cmd+Shift+F
, I'm able to close with Cmd+B
on Mac.
This is a frustrating takeover of screen real-estate!
The UI for VSCode's search results pane aren't fully like a modal and they're not quite like a vertical tab. If you hover over the icons in the left-hand margin, you'll see the keyboard shortcuts for the "Explorer" and for "Search". On a Mac, it's Command + 1 to toggle the explorer and Command + 3 to toggle the search results.
However, toggling the explorer may not leave your screen the way it was before the search, so this isn't really the clean solution many of us were hoping for.
Here's a related question/answer with instructions for creating a key-binding.
The closest I have been able to come to the "expected behavior" I desire is to add the following rule to the top of my keybindings.json
:
{
"key": "Escape",
"command": "workbench.view.explorer",
"when": "searchViewletVisible"
}
The when
clause helps scope its effect, but it may conflict with other commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With