VSCode:如何执行“清除搜索结果"在“在文件中查找"中不用鼠标? [英] VSCode: How to perform "Clear Search Results" in "Find in Files" without using the mouse?

查看:31
本文介绍了VSCode:如何执行“清除搜索结果"在“在文件中查找"中不用鼠标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我使用 Command-Shift-f 搜索项目目录中的文件后,打开的文件会突出显示搜索字符串.取消突出显示它们的唯一方法似乎是清除搜索结果.但是键入Esc"并不能这样做.我必须单击右上角的清除搜索结果"按钮.有键盘快捷键吗?

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?

推荐答案

更新:

现在您可以为这些命令添加键绑定.示例:

Now you can add keybindings for these commands. Example:

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

查找这些命令的最佳方法是在键绑定编辑器中进行搜索.其他的是 search.action.refreshSearchResultssearch.action.collapseSearchResults.

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

原答案:

还没有,但有一个开放的功能请求允许它:https://github.com/Microsoft/vscode/issues/23558

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

这篇关于VSCode:如何执行“清除搜索结果"在“在文件中查找"中不用鼠标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆