How do I search for files in Visual Studio Code?

后端 未结 12 1780
失恋的感觉
失恋的感觉 2020-12-04 04:52

I am used to Resharper where I can search for files, not the content, but the filename, which makes it quick to open new files.

Is this feature implemented in Visual

相关标签:
12条回答
  • 2020-12-04 05:05

    If you want to see your files in Explorer tree...

    when you click anywhere in the explorer tree and start typing something on the keyboard, the search keyword appears in the top right corner of the screen : ("module.ts")

    And when you hover over the keyword with the mouse cursor, you can click on "Enable Filter on Type" to filter tree with your search !

    0 讨论(0)
  • 2020-12-04 05:10

    Win: CTRL+P or CTRL+E

    Mac: CMD+P or CMD+E


    Don't want to remember another shortcut?

    Open the Command Palette:

    • Menu: View -> Command Palette
    • Windows Shortcut: Ctrl+Shift+P

    and hit backspace to delete ">" character and then begin typing to search for files via filename. :)

    0 讨论(0)
  • 2020-12-04 05:11

    Other answers don't mention this command is named workbench.action.quickOpen.

    You can use this to search the Keyboard Shortcuts menu located in Preferences.

    On MacOS the default keybinding is cmd ⌘ + P.

    (Coming from Sublime Text, I always change this to cmd ⌘ + T)

    0 讨论(0)
  • 2020-12-04 05:11

    consider you have thousand of files in vs code and you want to search for a file with particular name then

    1. Right click VS code editor.
    2. Select Command Palete
    3. In the text box type the file name

    0 讨论(0)
  • 2020-12-04 05:11

    If you just want to search a single file name

    Just Ctrl+P, then type and choose your one

    If you want to open all files whose name contains a particular string

    1. Open search panel
    2. Put any common words inside those files
    3. in 'files to include', put the search string with *, e.g. *Signaller*

    0 讨论(0)
  • 2020-12-04 05:17

    Also works in ubuntu with Ctrl+E

    0 讨论(0)
提交回复
热议问题