Sublime Forum

Key binding for switching tab behaves weird

#1

Hi,

I defined some key binding in user key-binding define file, as follows

[code]
{ “keys”: “super+1”], “command”: “focus_group”, “args”: { “group”: 0 } },
{ “keys”: “super+2”], “command”: “focus_group”, “args”: { “group”: 1 } },
{ “keys”: “super+3”], “command”: “focus_group”, “args”: { “group”: 2 } },
{ “keys”: “super+4”], “command”: “focus_group”, “args”: { “group”: 3 } },
{ “keys”: “super+5”], “command”: “focus_group”, “args”: { “group”: 4 } },
{ “keys”: “super+6”], “command”: “focus_group”, “args”: { “group”: 5 } },
{ “keys”: “super+7”], “command”: “focus_group”, “args”: { “group”: 6 } },
{ “keys”: “super+8”], “command”: “focus_group”, “args”: { “group”: 7 } },
{ “keys”: “super+9”], “command”: “focus_group”, “args”: { “group”: 8 } },

{ "keys": "super+shift+"], "command": "prev_view_in_stack" },
{ "keys": "super+shift+]"], "command": "next_view_in_stack" }

][/code]

for the first several times, it works fine, “super+shift+” triggers “prev_view_in_stack” and “super+shift+]” triggers “next_view_in_stack”

but after some time, it works oppositely, “super+shift+” triggers “next_view_in_stack” and “super+shift+]” triggers “prev_view_in_stack”

I’m using the Sublime Text 3 beta build 3033

Thanks

0 Likes

#2

“prev_view_in_stack” and “next_view_in_stack” go through the tabs in the order you had last been viewing/opening them, so you are probably expecting different functionality from a function that is doing what it’s supposed to be doing.

Try changing the commands to “prev_view” and “next_view” instead.

0 Likes

#3

[quote=“Lemon”]“prev_view_in_stack” and “next_view_in_stack” go through the tabs in the order you had last been viewing/opening them, so you are probably expecting different functionality from a function that is doing what it’s supposed to be doing.

Try changing the commands to “prev_view” and “next_view” instead.[/quote]

That’s exactly what I want, thank you!

0 Likes