Skip to content

Instantly share code, notes, and snippets.

@liuzxc
Forked from kendellfab/goto-sublime
Created February 9, 2017 02:45
Show Gist options
  • Save liuzxc/e01ef40f301d58dc3f760eff26c093b3 to your computer and use it in GitHub Desktop.
Save liuzxc/e01ef40f301d58dc3f760eff26c093b3 to your computer and use it in GitHub Desktop.
Add mouse click `goto definition` in sublime text 3.
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
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
}
]
@liuzxc
Copy link
Author

liuzxc commented Feb 9, 2017

I added another shortcut so ctrl+right-click will bring you back.

[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
},
{
"button": "button2",
"count": 1,
"modifiers": ["ctrl"],
"command": "jump_back"
}
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment