Simple Sublime 3 plugin to quickly navigate to the es6 import path.
Pathing support:
- Relative paths
- node_modules
- bower_components
- ember_addons
- ember-cli application paths
Ember CLI projects are supported by looking for a module_prefix and module_path setting. Also will look in node_modules for ember_cli addons.
Using package control:
Ctrl+Shift+P
orCmd+Shift+P
in Linux/Windows/OS X- type
add rep
, selectPackage Control: App Repository
- type
https://github.com/ryanhollister/es6navigator
Ctrl+Shift+P
orCmd+Shift+P
in Linux/Windows/OS X- type
install
, selectPackage Control: Install Package
- type
es6nav
, selectes6navigator
You will now need to edit the settings for es6navigator.
module_prefix is used if you are looking to have an es6 module name mapped to your projects application path. This is intended to support ember cli applications that map a module_prefix to the application path. These parameters are optional and relative and node_module paths will still work.
For example, if my ember-cli module_prefix is 'app' and the path to my ember cli app folder is ~/Code/my-ember-cli-app/app, then I would set the preferences like so:
{ "module_prefix": "app", "module_path": "/opt/code/my-ember-cli-app/app" }
Note that the module_path has to be an absolute path and ~ references wont work.
By default the es6navigator is tied to CMD+SHIFT+D or Control+Mouse Click. Simply move the cursor to a path inside an import statement and press the keybinding. the associated file should open.