I want to bind my forward and back mouse buttons (4, 5) to jump between previous cursor positions. I have my file
~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-mousemap
My code is as such
[
{
"button": "button4",
"command": "jump_back"
},
{
"button": "button5",
"command": "jump_forward"
}
]
I have also tried
{
"button": "button5",
"modifiers" : [],
"command": "jump_forward"
}
And even
{
"button": "button5",
"modifiers" : ["alt"],
"command": "jump_forward"
}
But the default next / prev tab set-up is always used. Using the sublime default key bindings works however
"alt" + "-"
"shift" + "alt" + "-"
Make sure you add these settings to a MOUSEMAP and not a KEYMAP.
If you open the folder of your key preferences and add create a file like this:
Default (Windows).sublime-mousemap
[
{
"button": "button4",
"command": "jump_back"
},
{
"button": "button5",
"command": "jump_forward"
}
]
Just make sure the filename conforms to whatever your keymap filename (e.g. replace WINDOWS with UNIX if that's how your keymap is named).
For Linux:
Default (Linux).sublime-mousemap
{ "button": "button8", "command": "jump_back" },
{ "button": "button9", "command": "jump_forward" }
Default (OSX).sublime-mousemap
{ "button": "button4", "command": "jump_back" },
{ "button": "button5", "command": "jump_forward" }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With