Sublime Forum

Switching tabs with keyboard

#1

I just upgraded to the latest version of Sublime Text. And now I have a problem with “ctrl+tag” or “ctrl+alt+tab”. I can’t predict which tab I’ll get after hinting the keyboard. I suppose it’s using some “smart” way to switch with the recent tabs I used but I’d like the old functionality back where tabbing just went in the order the tabs are displayed. But I can’t find anything in the settings to change this.
Does anybody have an idea on how to do this?

1 Like

How to change tab behavior?
Ctrl+Tab / Ctrl+Shift+Tab moving through tabs in wrong order
#2

You can use CTRL+PAGE UP or CTRL+PAGE DOWN to always go in tab order, rather than recently used order.

There may be another, easier way, but if you wanted to change that behaviour you could edit your default key bindings and switch the bindings around?

0 Likes

#3

cheers mate, that was it. I forgot to look in the key-bindings.

If somebody else has the same “problem”:
put this into your “User Key bindings” file (menu Preferences -> User Key bindings):

(between the )

1 Like

#4

[quote=“CWIZO”]cheers mate, that was it. I forgot to look in the key-bindings.

If somebody else has the same “problem”:
put this into your “User Key bindings” file (menu Preferences -> User Key bindings):

(between the )[/quote]

Yup I did this too when it came out with the new selection system, I mean in all tabbed applications I have used (ie: firefox) in windows ctrl+tab moves forward ctrl+shift+tab moves backwards…

I think this should be default but oh well at least we always have the ability to customize however we want it :smiley:

0 Likes

#5

For users looking to make this change in Sublime Text 2, note that the command has changed to “next_view” and “prev_view”, so add the following to your user keybindings:

{ "keys": "ctrl+tab"], "command": "next_view" },
{ "keys": "ctrl+shift+tab"], "command": "prev_view" }
1 Like

#6

is there a way to move tabs left and right with the keyboard ?

0 Likes

#7

I use this one:
github.com/SublimeText/MoveTab

It seems compatible with ST3 as well.

This is quite the zombie thread isn’t it?

Hope this helps,
Alex

0 Likes

#8

[quote=“nick.”]For users looking to make this change in Sublime Text 2, note that the command has changed to “next_view” and “prev_view”, so add the following to your user keybindings:

{ "keys": "ctrl+tab"], "command": "next_view" }, { "keys": "ctrl+shift+tab"], "command": "prev_view" } [/quote]

thx a lot! works like a charm in #st3

0 Likes

#9

I get an error when doing this - the file “Default (Windows)-sublime-keymap-User” file is empty. when I paste either this:

{ "keys": "ctrl+tab"], "command": "next_view" }, { "keys": "ctrl+shift+tab"], "command": "prev_view" }

I get a warning saying "Error trying to parse file: Unexpected trailing characters in Packages\User\Default (Windows).sublime-keymap:1:49

It’s sublime text 3 - what’s the prob I wonder?

0 Likes

#10

Missing square brackets, must be:

{ "keys": "ctrl+tab"], "command": "next_view" }, { "keys": "ctrl+shift+tab"], "command": "prev_view" } ]

0 Likes

#11

I found the following to be helpful:

	{ "keys": "ctrl+pagedown"], "command": "next_view_in_stack" },
	{ "keys": "ctrl+pageup"], "command": "prev_view_in_stack" },

	{ "keys": "ctrl+tab"], "command": "next_view" },
	{ "keys": "ctrl+shift+tab"], "command": "prev_view" },

Gives me the ordered display of tabs for Ctrl-(Shift)-Tab, but still allows the most recent view by assigning that to Ctrl-Page(up|down)

0 Likes

#12

Sorry to revive this thread, but this is my first choice in Google search and it must be corrected.

The syntax should be

[
  { "keys": ["ctrl+tab"], "command": "next_view" },
  { "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
1 Like

#13

Created this account just to say that @mnv2k2’s answer still works in 2023. Thank you.

0 Likes