Goto Related
Jump to similarly named files in Sublime Text
Details
Installs
- Total 387
- Win 169
- Mac 146
- Linux 72
Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Overview
In a large project, related files often have similar names. Goto Related is a shortcut to show the Goto Anything overlay with the current filename pre-populated.
For example, if you are viewing app/views/rocket_launch.html.erb
and press
⌘+.
, the fuzzy file finder palette appears with rocket_launch
pre-populated.*
* This assumes that you have Goto Related configured to strip file extensions.
Installation
You can install the package manually or, if you use Package Control, install “Goto Related”.
Configuration
Discarding patterns
Goto Related can be configured to discard parts of the current filename using
regular expressions. This is done in your project settings
(Project > Edit Project
) or your global settings
(Sublime Text > Preferences > Settings - User
). For example:
"goto_related_patterns_to_strip": [
"^_",
"\\..+$",
"_spec$",
"_controller$"
]
will strip leading underscores, file extensions, and a couple suffixes, so:
_partial.html.erb
becomespartial
utilities_helper_spec.rb
becomesutilities_helper
rocket_launch_controller_spec.rb
becomesrocket_launch
Project-level configuration overrides global configuration. The regular expressions are executed in the order they are defined.
Custom key binding
You can change the default keyboard shortcut in
Sublime Text > Preferences > Key Bindings - User
. This defaults to:
[
{ "keys": ["super+."], "command": "goto_related" }
]
Development
To run the test suite:
pip install -r requirements.txt
python test/test_goto_related.py