skyline
skyline

Reputation: 473

How to search specific filename in Visual Studio Code?

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?

Upvotes: 6

Views: 6989

Answers (2)

Denis Howe
Denis Howe

Reputation: 2412

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.

Upvotes: 2

Jeremy
Jeremy

Reputation: 1568

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...

Upvotes: 5

Related Questions