问题
This is an extremely stupid question... but how do I close/toggle the search box in vscode?
I hit [ cmd + shift + f ] to do a global search, but then I need to reach for my mouse to actually close the box to allow for more screen space.
I've searched through their issues, and there seems to be another user in the past who also experienced something similar --> https://github.com/Microsoft/vscode/issues/32613 , but the solution provided of cmd - b only works for closing the sidebar.
My developer speed has drastically dropped since this issue, and I'm certain there's been a fix.
Please help. :(
**added in picture here -->
回答1:
Your search results are appearing in the panel not in the sidebar, so if you want to close the panel just press cmd + ` or ctrl + `
However, if you want your search results to appear in the sidebar (which I think is the default behavior), then add this line to your settings:
"search.location": "sidebar"
回答2:
Similar to what Vijey has mentioned, you can use the Toggle Panel
keyboard shortcut which will do the job for me. On A mac the shortcut is
⌘ Command+J
I'm coming from sublime where the search results appear in a new tab - making it much easier to close the results (just like closing an other tab)
回答3:
There is no keyboard shortcut to close the search panel. However, you can create a shortcut yourself as shown in the attached image.
1) Go to File > Preferences > Keyboard Shortcuts. 2) Search for the command 'Close Panel' and set it to your convenient keyboard shortcut.
In the image below, I set it to Ctrl+F8.
来源:https://stackoverflow.com/questions/50078372/how-to-close-the-search-toggle-for-vscode