6

For example, I want to search a file whose name is "module-product.js" to rename it.

But there are lots of files whose names started with "module-".

How to quickly find the specific file in Visual Studio Code?

3
  • 5
    ...You hit Ctrl-P (or Command-P on a Mac) and start typing product.js? Commented Oct 8, 2018 at 10:29
  • Hi @ChatterOne, the method works! Could you add the answer below? I'll choose it as the useful answer. Thank you. Commented Oct 9, 2018 at 4:23
  • Duplicated question as: stackoverflow.com/questions/32648566/… Commented Jan 9, 2019 at 15:15

2 Answers 2

5

Ctrl+P and enter details into the popup that you would like to search for! You can prefix the search with # to search for a function.

Others (on a mac) include;

  • +T Show all Symbols
  • +G Go to Line...
  • +P Go to File...
  • ++O Go to Symbol...
Sign up to request clarification or add additional context in comments.

Comments

2

A secret feature of VSCode is the explorer filter.

Cmd-Shift-E (or clicking the sidebar) focusses the explorer. Typing some characters shows only files or directories whose names contain the given characters. Esc clears the search.

As usual, you can use Up- and Down-Arrow to navigate the displayed file list and Cmd-Down to open the currently highlighted file.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.