如何在 macOS 上打开 VS Code 的自动搜索? [英] How to turn on auto search on VS Code on macOs?

查看:30
本文介绍了如何在 macOS 上打开 VS Code 的自动搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows 上的 Visual Studio Code 中使用搜索功能时,当我在搜索文本框中键入内容时,它会自动完成搜索.在 macOS 上,我必须按 Enter 键才能进行搜索.

When using the Search functionality within Visual Studio Code on Windows, as I'm typing into the search textbox, it does autocomplete searching. On macOS, I have to hit the enter key for the search to happen.

有没有办法在 macOS 上的 VS Code 中打开自动搜索的自动完成功能?

Is there a way to turn on autocompletion of auto search in VS Code on macOS?

我目前在大苏尔.MBP 16"2019.

I'm currently on Big Sur. MBP 16" 2019.

推荐答案

也许您在 Mac 上将 searchOnType 设置设为了 false.

Maybe you have the searchOnType setting set to false on your Mac.

// Search all files as you type.
"search.searchOnType": true,

// When #search.searchOnType# is enabled, controls the timeout in 
// milliseconds between a character being typed and the search 
// starting. Has no effect when search.searchOnType is disabled.
"search.searchOnTypeDebouncePeriod": 300,

它是作为 1.41 版本的一部分添加的(确保至少有这个版本):
https://code.visualstudio.com/updates/v1_41#_update-search-results-as-you-type

It was added as part of the 1.41 release (make sure to have at least this version):
https://code.visualstudio.com/updates/v1_41#_update-search-results-as-you-type

在全文搜索中,结果现在会在您输入时更新.这在构建复杂的正则表达式查询等场景中尤其有用,在这种情况下,对查询的快速反馈可以帮助您编写正则表达式.

In full text search, results will now update as you type. This is especially helpful in scenarios like constructing complicated Regular Expression queries, where fast feedback on a query can help you to write the RegEx.

注意:可以通过将search.searchOnType设置为false来禁用此功能,并且输入和搜索之间的延迟可以通过search.searchOnTypeDebouncePeriod,默认为 300 毫秒.

Note: This feature can be disabled by setting search.searchOnType to false, and the delay between typing and searching can be adjusted with search.searchOnTypeDebouncePeriod, which defaults to 300 ms.

这篇关于如何在 macOS 上打开 VS Code 的自动搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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