问题
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.
Is there a way to turn on autocompletion of auto search in VS Code on macOS?
I'm currently on Big Sur. MBP 16" 2019.
回答1:
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,
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.
Note: This feature can be disabled by setting
search.searchOnType
tofalse
, and the delay between typing and searching can be adjusted withsearch.searchOnTypeDebouncePeriod
, which defaults to 300 ms.
来源:https://stackoverflow.com/questions/65421180/how-to-turn-on-auto-search-on-vs-code-on-macos