0

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.

enter image description here

1 Answer 1

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, 

enter image description here

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 to false, and the delay between typing and searching can be adjusted with search.searchOnTypeDebouncePeriod, which defaults to 300 ms.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks, I looked at this, where would I add this? I tried in settings.json but it highlights as Unknown Configuration Setting
@DarrenSweeney In settings.json would be the correct place. Check that you have a 1.41+ version of VS Code installed, as that's when that setting was added.
@DarrenSweeney Either on the User or the Workspace settings.json (added image to my answer).
Thanks - the issue was the version. I had downloaded and was using VS Code from the downloads folder on my MBP which is classed as a read-only folder, so VS Code does not auto update. Who knew? Well, I do now - thanks again

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.