Sublime Text 3 - Specific Language Go to Definition Keyboard Shortcut

How can I set the "Goto Definition" according to the language I'm working on.

For example:

In Python, I want to use PythonIDE to determine:

{ "keys": ["ctrl+d"], "command": "python_goto_definition" }, 

And for any other language like Go, I want to use GoSublime to define:

 { "keys": ["ctrl+d"], "command": "go_sublime_goto_definition" }, 

I am wondering how can I set the context?

+1
python go sublimetext3
Aug 05 '16 at 14:35
source share
1 answer

The context you want is for selector :

 { "keys": ["ctrl+d"], "command": "python_goto_definition", "context": [ { "key": "selector", "operator": "equal", "operand": "source.python" } ] }, 

If necessary, you can add more or less specificity. Use Ctrl + Shift + Alt + P or Shift + Ctrl + P (MacOS) to view the area selector for the current position.

+1
Aug 05 '16 at 18:53
source share
— -



All Articles