Sublime Forum

Tab switching with 2-axis scroll wheel

#1

Hi all ! I discover Sublime last month but & iam very enthoutiast, but i have a problem and i fail to solve it, so i come here for find help.

I use a mouse with 2-axis scroll wheel, the horizontal axis is commonly used in desktop app for switch tab (in the browser, for example, or in many windows).
Same in Notepad++.

But with Sublime, the tab switching seem me… little random. The tab selected is never the same, for sure, not always the direct left or right tab of my actuel tab.

I have read differend thing about 2 type of tab switch in Sublime, but if i can change keyboard shortcut between CTRL+TAB & CTRL+Next page, i can’t change the bind of my mouse (the system manage it).

So, can i change the “mode” of tab switching enterely in SublimeText ? (or other trick)

Thx for reading & - i hope - for ur help. :wink:

0 Likes

#2

You can customize the mouse behavior editing yoiur *.sublime-mousemap file. It is not accessible directly by the menu:

Change this keybinding to a command to switch tabs as you like:

	// Switch files by holding down button 2, and using the scroll wheel
	{ "button": "scroll_down", "modifiers": ["button2"], "command": "next_view" },
	{ "button": "scroll_up", "modifiers": ["button2"], "command": "prev_view" },

You can see the commands from your keyboard file as example:

0 Likes

#3

Hi & thx for reply, i have been create my Default (Windows).sublime-mousemap but any thing added make the input concerned innoperant.

Actually my file content is the following :

[
{
“button”: “button3”,
“press_command”: “drag_select_callback”,
“press_args”: {“by”: “columns”}
},
]

The result is the disable of the bind.
I don’t know why because i only paste default lines.

So,
My problem is not solved, because i don’t know the button name for prev tab or next tab, if y try button7 or 8 or 9 it will work ?

If yes, i have only to solve my problem n1.

My sintax of sublime-mousemap is incorrect or what ?

Thx for all.

EDIT :
I finded a solution for my problem, i simply replace keyboard shorcuts like that :

{ “keys”: [“ctrl+tab”], “command”: “next_view” },
{ “keys”: [“ctrl+shift+tab”], “command”: “prev_view” },

And it’s work (also for my mouse wheel).
So, it’s signify the bind of mouse depending of keyboard mouse, good to say.

BUT, if anyone can explain me what my sublime-mousemap don’t work, i want always know. :wink:

0 Likes

#4

The correct syntax on the mousemap file to change the view with the scroll, would be like this:

[
    { "button": "scroll_down", "command": "next_view" },
    { "button": "scroll_up", "command": "prev_view" },
]
0 Likes