Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>F12: Open FileNew to Visual Studio Code? Get it now.
F12: Open File

F12: Open File

rexebin

|
6,745 installs
| (2) | Free
Extending Go to definition to open file when the look up symbol is a file name with relative path.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

F12 Open File

F12 Open File

F12: Open File extension is a Definition Provider, which means it only react to 'Go to Definition'.

Use case: open Angular's templateUrl and styleUrls at a key stroke: F12 when cursor is within the url quotes, without any configuration.

Usage

  1. move cursor to file name string in any file. A file name must be a string with single or double quote with relative path and file extension.
  2. press F12 to open.
  3. CMD/CTRL + Click to open, or CMD/CTRL + ALT + Click to open side by side.

Note: Only works with relative paths with full file name and extensions

Links

Source code

Install "F12: Open File" from VSCode Marketplace

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft