Created
June 23, 2015 18:46
-
-
Save diegoarigony/0a7730a921b8533b87af to your computer and use it in GitHub Desktop.
SublimeText - Ctrl+click go to definition - From http://stackoverflow.com/questions/16235706/sublime-3-set-key-map-for-function-goto-definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For anyone else who wants to set Eclipse style goto definition, you need to create .sublime-mousemap file in Sublime User folder. | |
Windows - create Default (Windows).sublime-mousemap in %appdata%\Sublime Text 3\Packages\User | |
Linux - create Default (Linux).sublime-mousemap in ~/.config/sublime-text-3/Packages/User | |
Mac - create Default (OSX).sublime-mousemap in ~/Library/Application Support/Sublime Text 3/Packages/User | |
Now open that file and put the following configuration inside | |
[ | |
{ | |
"button": "button1", | |
"count": 1, | |
"modifiers": ["ctrl"], | |
"press_command": "drag_select", | |
"command": "goto_definition" | |
} | |
] | |
You can change modifiers key as you like. | |
Since Ctrl-button1 on Windows and Linux is used for multiple selections, adding a second modifier key like Alt might be a good idea if you want to use both features: | |
[ | |
{ | |
"button": "button1", | |
"count": 1, | |
"modifiers": ["ctrl", "alt"], | |
"press_command": "drag_select", | |
"command": "goto_definition" | |
} | |
] | |
Alternatively, you could use the right mouse button (button2) with Ctrl alone, and not interfere with any built-in functions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment