Reputation:
I'm using Mac OS X with Visual Studio Code 0.10.10.
How do I use the keyboard to open a file, using its partial name, in the currently open project? I can't find a command in the Command Palette that would enable me to do this. There is a command that does this for Working Files (see screenshot), but not for the currently open project.
Upvotes: 24
Views: 24610
Reputation: 2671
>
prefix is for running commands in VSCode.
To open a file in the current project press Cmd ⌘ + P and type the full / partial name of the wanted file. VSCode uses fuzzy search, so you can even get away with typos in your input.
Upvotes: 47
Reputation: 9
Ctrl+O opens the command palette right to the file search mode. The command in the shortcuts is "workbench.action.files.openLocalFile".
Upvotes: -1
Reputation: 13923
Open file opening pallet with ctrl+p (on Windows) and cmd+p on Mac OSX.
In that pallet you can either type the file name
or a file relative path
like shown in the below image
The important point for relative path is that, it should not start with a dot .
but should start with a fwd slash /
Absolute path can be used as well.
Upvotes: 0
Reputation: 51
To open known file on a current project if you aware the file name is Ctrl+P Windows.
Upvotes: 5
Reputation: 2523
There is not a proper command for this but if your file has any file extension you can just open the command palette and replace the >
with a .
It will have a section of the open files at the top and "file and symbol results" at the bottom containing every file name containing a .
(= all files with a file extension)
If you know the name of the file you can simply remove the >
in the command palette and type the name and it will show the file and symbols results again for any file containing what you have typed.
Upvotes: 9