Open arnsa opened 6 years ago
To add a custom key binding go to Preferences > Key Bindings
and add your keys.
For example:
[
{
"keys": ["super+alt+g"], // This is the default key binding for Go to definition feature!
"command": "javascript_enhancements_go_to_definition"
}
]
Here the docs: http://docs.sublimetext.info/en/latest/reference/key_bindings.html
@pichillilorenzo but what about ctrl+click? I've tried to set it up like this in Default (OSX).sublime-mousemap file, but it doesn't work :(
[ { "button": "button1", "count": 1, "modifiers": ["ctrl"], "press_command": "drag_select", "command": "javascript_enhancements_go_to_definition" } ]
@arnsa works for me:
[
{
"button": "button1",
"count": 1,
"modifiers": ["super"], // "super" is cmd button. "ctrl" also works fine
"press_command": "drag_select",
"command": "javascript_enhancements_go_to_definition",
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.js, source.jsx" }
]
}
]
@helsus thanks, it didn't work with super (probably because cmd+click adds new cursor on sublime, but it worked with ctrl! It doesn't open a file when I click on an import :(, any ideas why?
Is it possible to somehow add a shortcut (e.g. ctrl+click) to go to definition? The default one from Sublime doesn't work. :(