-
-
Save kendellfab/6135193 to your computer and use it in GitHub Desktop.
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" | |
} | |
] |
Thank you very much @DVLP
Is there any way to make it universal? typescript one doesn't work with other file types, default one doesn't work in TS
Good one! Thank you!
@phackwer it looks like your link is now broken https://gist.github.com/phackwer/2bd92058a7dc8d68a35f
Hi Guys.
I have sublime Text 3 in 3 computers with Ubuntu. It does not work in any.
I did file: "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User with this content
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
}
]
This "shortcut combination" worked to me as multiselect cursor before, but now not. This mean shortcut somehow work. But not as I expected. When I hold Ctrl and click Left mouse on any function name or wherever, nothing happen.
I tried many times Copy-Paste it, restart ST3. I have this plugins:
- All Autocomplete.sublime-package
- BracketHighlighter.sublime-package
- Laravel Blade Highlighter.sublime-package
- Package Control.sublime-package
- PHP-Twig.sublime-package
- SublimeLinter-php.sublime-package
- SublimeLinter.sublime-package
- Theme - Kronuz.sublime-package
- Twig.sublime-package
Any idea, why it doesn't work for me?
@greksak you must remove "count": 1
, to make it works..
...from the future 2021
... no we still have not ended world hunger
But on ST4 on MacOS, and inside the file Default.sublime-mousemap
:
[
{
"button": "button1",
"modifiers": ["super"],
"press_command": "drag_select",
"command": "goto_definition"
},
{
"button": "button2",
"modifiers": ["super"],
"command": "jump_back"
}
]
worked for me
For some reason, it works only on already opened tabs. If the tab is closed it does nothing. It worked before but at some point stopped. Any suggestions?
If you want VS Code style, like ctrl + button1
for definition and alt + button1
for selecting multiple lines, then paste this content instead:
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
},
{
"button": "button1",
"count": 1,
"modifiers": ["alt"],
"press_command": "drag_select",
"press_args": {"additive": true}
}
]
macOS Default (OSX).sublime-mousemap
in "~/Library/Application Support/Sublime Text 3/Packages/User/"
:
[
// ⌘+LeftClick => goto definition
{
"button": "button1",
"count": 1,
"modifiers": ["super"],
"press_command": "drag_select",
"command": "goto_definition"
},
// ⌘+RightClick => jump back
{
"button": "button2",
"modifiers": ["super"],
"command": "jump_back"
},
// ⌥+LeftClick => set multiple cursors
{
"button": "button1",
"count": 1,
"modifiers": ["alt"],
"press_command": "drag_select",
"press_args": {"additive": true}
}
]
Unfortunately, it conflicts with editor features like multiple cursors/selection, effectively disabling them. Is there a way to apply this only when definition is available?