Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to quickly find files or symbols in a project in visual studio code?

Here's a demonstration of the feature in IntelliJ (https://www.youtube.com/watch?v=EtnI2doW6XE)?

In case the video isn't viewable, basically the user presses a key-combo, and a dialog box pops up that will reactively response and filter based on the string the user starts to type in. It will show classes and files (and much more) matching what you've typed in. I won't go in to all the details, as I'm not looking for an exact match to this functionality -- I'd be happy if it just searched based on file name for starters! Anything to prevent me from having to browse for a filename in the project Explorer to open the file in vs code when I want to switch to the given file.

I saw How do I search for files in Visual Studio Code? - for me (on Linux) Ctrl-E just shows the file I currently have open under the project explorer (useful sometimes, but not what I'm looking for).

like image 332
bbarker Avatar asked Jan 29 '23 12:01

bbarker


2 Answers

  • Cmd + P opens a search bar for files (doc),
  • Cmd + T opens a search bar for symbols (doc),
like image 91
Laurent Avatar answered Feb 05 '23 17:02

Laurent


Are you just looking for CTRL-P That brings up a file list. Which is searchable. You can then tab down and right arrow opens up that file. Enter will open a split editor on the file.

Also, if you CTR-p and then type ? you will get a list of keys you can hit such as to "Go to Symbols" and much more in your file or workspace.

And look at CTRL-R it probably does exactly what you are looking for as far as files go.

like image 29
Mark Avatar answered Feb 05 '23 19:02

Mark