kylpo / vscode-open-related

VSCode extension to open files related to your current one.

Home Page:https://marketplace.visualstudio.com/items?itemName=kylpo.vscode-open-related

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode Extension: Open Related

Version Installs

Open files related to your current one.

Features

Currently, this is a bare-bones, primitive implementation of a command that shows files related to your current one. It does so by pre-populating VSCode's Quick Open command, but may be improved upon in the future with a custom menu that finds and creates files (when they don't already exist).

Note: by default, this highlights peer or descendent files. If, however, you are already in a descendent file (e.g. /__tests__/MyFile.test.ts), it will show related files from the folder above it (e.g. ../MyFile).

Extension Settings

Open your keybindings.json and add a keybinding like:

{
  "key": "cmd+shift+o",
  "command": "extension.openRelated",
  "when": "editorTextFocus"
}

Identify subdirectories to the root file of a related groups by adding to your settings.json something like:

"extension.openRelated.subdirectories": ["__tests__", "__stories__"]

Above's configuration will work well with a folder structure like:

MyFile.tsx
/__tests__/MyFile.test.tsx
/__stories__/MyFile.stories.tsx

Release Notes

1.0.0

Initial release

Developer

Helpful Resources

Similar Extensions

About

VSCode extension to open files related to your current one.

https://marketplace.visualstudio.com/items?itemName=kylpo.vscode-open-related


Languages

Language:TypeScript 100.0%