Skip to content

VS Code Quick Search

VS Code Quick Search

In VS Code, we can perform a text search within an open editor (CTRL + F) as well as across the workspace (CTRL + SHIFT + F).

But starting with version 1.89, we can also perform a Quick Search.

There are several methods by which we can use Quick Search.

🎥 Don’t feel like reading? How about a video tutorial instead?

Run the Quick Search command

Press down CTRL + SHIFT + P and run the Search: Quick Search command.

VS Code Quick Search

Running the Quick Search command like this will open a new window where you type in the text you want to search for.

VS Code Quick Search example

This is the most tedious way of using the Quick Search, which leads us to the next method.

Use the “%” shorthand

Press down CTRL + P and type in % followed by the text you want to search for.

VS Code Quick Search example

Not bad.

But there is an even faster way.

Setup a keybind

To set up a keybind, press down CTRL + SHIFT + P and open the Preferences: Open Keyboard Shortcuts command.

In there search for workbench.action.quickTextSearch and set up a keybind to your liking.

VS Code Quick Search keybind

I’m going with CTRL + F CTRL + F because I find it accessible and easy to remember.

Go back to the editor and try out the new keybind.

Note that you can also select a text and then press the keybind to quickly search it instead of typing in the text you want to search for.

VS Code Quick Search keybind example

Other actions

Within the Quick Search window you can find 2 icons:

  1. Open File
  2. See the search results in the Search Panel
VS Code Quick Search Open File or see the search results in the Search Panel

This is it for now!

Happy coding 💜


Let me know what you think about this article in the comments section below.

If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.   
  

Comments