The Computer Oracle

Change middle mouse button in Sublime Text

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: City Beneath the Waves Looping

--

Chapters
00:00 Change Middle Mouse Button In Sublime Text
00:21 Accepted Answer Score 33
01:11 Thank you

--

Full question
https://superuser.com/questions/923857/c...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#mouse #sublimetext2 #sublimetext3 #sublimetext

#avk47



ACCEPTED ANSWER

Score 33


You need to create a custom mouse map in Linux and add the relevant bindings that define the Windows behavior. In Sublime, create a new file with JSON syntax and the following contents:

[
// Mouse 3 column select
{
"button": "button3",
"press_command": "drag_select",
"press_args": {"by": "columns"}
},
{
"button": "button3", "modifiers": ["ctrl"],
"press_command": "drag_select",
"press_args": {"by": "columns", "additive": true}
},
{
"button": "button3", "modifiers": ["alt"],
"press_command": "drag_select",
"press_args": {"by": "columns", "subtractive": true}
}
]

Then, save the file as ~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-mousemap. You should now be able to mimic the Windows middle mouse functionality in Linux.

Notes:

  • This will work with both Sublime Text 2 and 3.
  • For OS X, the path to save the file is ~/Library/Application Support/Sublime Text 3/Packages/User/Default (OSX).sublime-mousemap (note the OSX in the parentheses instead of Linux).