Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Open Related FilesNew to Visual Studio Code? Get it now.
Open Related Files

Open Related Files

Georgi Gardev

|
405 installs
| (0) | Free
Quickly navigate files that are in the same folder and have the same name as the file you have currently opened.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Open Related Files

Version Installs Build Status

Open Related Files is a VS Code extension that allows you to quickly navigate files that are in the same folder and have the same name as the file you have currently opened.

Demo

VS Code Open Related Files Demo

Features

QiuckPick list

Use the command Open Related Files or the default shortcut cmd+shift+r. This will show the Open Related Files QuickPick list. The list shows all extensions for related files - i.e. if you have opened main.html and there are main.css and main.js files in the same folder, the list will display css and js.

Create Related File

Use the command Create Related File to create a new file next to the currently opened file. The new file will have the same name and the extension that you specified.

Custom shortcuts

openRelatedFiles.open

  • Opens the QuickPick list.
  • Default: cmd+shift+r.

Example / Default:

{
  "key": "cmd+shift+r",
  "command": "openRelatedFiles.open",
}

openRelatedFiles.withExtension

  • Define your own custom shorctuts for a specific extension.
  • Directly opens the related file with the specified extension if such file exists.
  • No default shortcut provided.

Example:

{
  "key": "alt+cmd+c",
   "command": "openRelatedFiles.withExtension",
   "args": "css"
}

openRelatedFiles.create

  • Execute the 'Create Related File' command.
  • No default shortcut provided.

Extension Settings

This extension contributes the following settings:

openRelatedFiles.limitToExtensions:

  • Type: Array
  • Default: []

Only look for this specific list of extensions, ignore all other files. Will be ignored if array is empty.

openRelatedFiles.openSingleFile:

  • Type: boolean
  • Default: true

If there is only one related file, open it without prompt.

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