In a large project, related files often have similar names, but they tend to be long and tedious to type when navigating the codebase. quick-open-related-files is a VS Code extension that launches the quick open menu with the current filename pre-filled (after applying an optional set of transformations, e.g. removing the file extension).
For example, if you are viewing app/views/rocket_launch.html.erb
and trigger
quick-open-related-files, depending on your configuration, you might see:
The easiest way to install is to search for "Quick Open Related Files" in the vscode extension marketplace.
Alternatively, you can manually install using:
cd ~/.vscode/extensions/
git clone https://github.com/schreifels/vscode-quick-open-related-files.git
By default, you can list related files for the currently open file using the
⌘+.
keyboard shortcut or by selecting "Quick Open Related Files" in the
command palette.
You can customize the keyboard shortcut by adding this to keybindings.json
:
{
"command": "quickOpenRelatedFiles.show",
"key": "cmd+."
}
There are a couple options to customize how the extension manipulates the
current path before pre-populating the quick open menu. See the
contributes.configuration
section of the package.json
file for more details.
- Initial release
Clone the repo, npm install
, and open the directory in VS Code. For your
convenience, it comes preconfigured with the "Launch Extension" and
"Launch Tests" launch configurations.