Back to all posts

Open a File Fast in VS Code Without a Mouse

A quick VS Code tip for jumping straight to any file with the keyboard, using Quick Open.

Watch the video

Loading this video connects you to YouTube (Google), which receives your IP address and may store or read information on your device for playback and advertising. YouTube may show ads. Choose Load YouTube video to allow this for this video. See Google's privacy policy.

Watch Open a File Fast in VS Code Without a Mouse on YouTube

Open a file with Quick Open

Here's how I open a file quickly in VS Code without touching the mouse.

Press Ctrl+P to open Quick Open, then start typing part of the file name. You do not need the whole name. In the video I only type the first two letters. Press the down arrow a couple of times to move through the list and hear what's there, and once you land on the file you want, press Enter.

That's it. No mouse needed.

Two more things Quick Open can do

Once the file is open, press Ctrl+P again and type a colon followed by a line number, such as :42, then press Enter to jump to that line. Or type @ to get a list of the functions and other symbols in the file, and arrow through it to hear how the file is laid out.

If you want the big picture of a long file first, I also fold all the code before I start reading.

Analytics choices

May I use Google Analytics to understand which pages people read? If you accept, Google receives information about your visits and device, and stores analytics cookies in your browser. You can decline and still use the whole site.

If you close this dialog without choosing, analytics stays off and you will not be asked again on this device for 180 days. You can change your choice at any time using Analytics choices at the bottom of the page. Your choice is remembered for 180 days. Read the privacy policy.