File Jumper 🦘: Intelligent File Navigation for VSCode
File Jumper is a handy VSCode extension that simplifies navigation between related files in your workspace. It detects and helps you quickly jump to associated files, based on your own rules, making your workflow more efficient.
Try File Jumper today and experience a smoother, more connected file navigation experience in VSCode! 🚀
Install the extension from the VSCode Marketplace or by searching for "File Jumper" in the VSCode extensions panel.
Customize the extension's behavior by modifying the following settings in your VSCode
The extension will automatically detect changes to the configuration and update the file links accordingly.
An object that defines the file types in a project that will be evaluated for automatic linking.
The object keys represent the file type names. The values are objects that define the file type's behavior. The following properties are supported:
NOTE: A Minimum of 2 file type definitions (properties) is required to be able to show links between files.
NOTE: Due to a limitation with VS Code settings either need to be defined as local settings for each workspace or globally in the user settings for all workspaces, not both. This is because VS Code does not allow the user settings to be overridden by workspace settings and instead deep merges workspace settings into the user settings, which might cause unexpected behavior.
If you want to use custom settings for this extension in each workspace, you will need to remove the the user settings.
Patterns and Links
The extension uses RegEx for matching file paths, instead of glob patterns, to allow for more flexibility in the rules that can be defined.
The extension requires defined RegEx patterns to capture specific named groups from file paths which will be used to determine if files of different types are related. The named groups that can be matched are:
Multiple patterns can be defined and these are evaluated in the given order, where the first match is used. This allows for more complex folder structures and exceptions to rules to be supported. This means more specific patterns should be defined first so they can match their specific cases before more general patterns are evaluated.
The extension will automatically link all files of different types that resolve to the same topic and prefix (if defined). You can customise which files can link to/from other files by using the
NOTE: Path comparisons are case-insensitive.
NOTE: For building Regex patterns easily try RegExr which has a handy cheat sheet, live evaluation, and lets you test your patterns against multiple strings (paths) at the same time.
Defines the RegEx patterns of files to ignore when determining file links.
Defines whether the extension should automatically jump to the related file when only one file is found.
For handling file system changes, the extension uses the VSCode file watcher to watch files in a workspace, however this can be resource intensive if there are a lot of files.
This setting defines the files and folders to exclude from the file watcher, to improve performance. Note, this is a native VS Code setting and is not specific to this extension. See the defaults for this option in the VS Code Default Config.
The option format is an object where the keys are glob patterns to ignore and the keys are booleans defining whether to ignore the patterns.
To use File Jumper, simply right-click on a file in the file explorer panel or on a file tab which has one of the icons from your configuration (which shows it has links to other files) and select "Jump to...".
You'll be presented with a list of related files, which you can quickly filter and select. The chosen file will open in a new tab.
The Eslint project has the perfect structure to demonstrate the power of File Jumper. It is very organised and consistently named with:
Where the file structure in those root folders are the same, except for the prefix, which makes it easy to define patterns for linking those files together.
Here is an example configuration for the Eslint project (note: the prefix capture group isn't required here as the file structure isn't nested):
This configuration and the Eslint project were used to create the demos above.
This creates links between files which are visualised with icons in the file explorer as below (which also makes it easier to identify removed rules without source code or tests):
The Rxjs project is another good example, however in this case there are some naming inconsistencies e.g. there are spec files in
Here is an example configuration for the Rxjs project (note: the prefix capture group isn't required here as the file structure isn't nested):
In this case we need to define multiple patterns, ie one to match the exceptions first then a fall back pattern for the normal case, which links the files as follows:
This project is still in its early stages and any contributions are welcome!
Contribution guide TBC