Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode: How to perform "Clear Search Results" in "Find in Files" without using the mouse?

After I search through files in the project directory with Command-Shift-f, the files that are opened are have the search string highlighted. The only way to unhighlight them seems to be to clear the search results. But typing "Esc" doesn't do that. I have to click the top-right corner "Clear Search Results" button. Is there a keyboard shortcut for that?

like image 972
agentofuser Avatar asked Sep 18 '17 20:09

agentofuser


1 Answers

Update:

Now you can add keybindings for these commands. Example:

{
    "key": "cmd+escape",
    "command": "search.action.clearSearchResults",
    "when": "editorTextFocus"
}

The best way to find these commands is by searching in the Keybindings editor. The others are search.action.refreshSearchResults and search.action.collapseSearchResults.


Original answer:

Not yet, but there is an open feature request to allow it: https://github.com/Microsoft/vscode/issues/23558

like image 148
Rob Lourens Avatar answered Oct 21 '22 08:10

Rob Lourens