Goto Related
Jump to similarly named files in Sublime Text
Details
Installs
- Total 401
- Win 175
- Mac 151
- Linux 75
Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
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 | 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