Sublime Forum

Sublime Text Tab Switching

#1

Can someone explain to me how Ctrl+tab works? I have a hunch it has something to do with either the order the tabs were opened or last accessed, but frankly I find this behavior confusing.

Is there any way to switch it to just left-to-right tab switching?

0 Likes

Ctrl+Tab / Ctrl+Shift+Tab moving through tabs in wrong order
Jump back one whole file at a time?
#2

It works in the same way alt+tab does (or command+tab on OS X), by switching between tabs in a most-recently-used stack. When you release ctrl, the currently selected file is moved to the top of the stack.

For other ways to switch files, including switching directly to the left and right one, take a look at the “File/Switch File” menu.

0 Likes

#3

File/Switch now are placed Goto/Switch

To me that behaviour also confusing.

You can change behaviour like this: Preferences/Key bindings - User

{ "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" }

]

PS. sublimetext.com/blog/article … build-2165
From description CTRL+P has different commande that is described

3 Likes

#4

@KES – Great, thanks for that!

0 Likes

#5

For switching left/right in mac you can use

File on left side - [command + alt + left arrow]
File on right side - [command + alt + right arrow]

0 Likes

#6

On Mac, command-shift- and command-shift-] also seem to work.

1 Like

#7

“super+shift+[”
“super+shift+]”

is for far better :slightly_smiling:

0 Likes

#8

The [ symbol is needed after each “keys”: string. Thus, it is as follows:

[

{ "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" }

]

Thank you though, it’s what I was looking for. :slight_smile:

0 Likes

#9

[ characters got stripped from many code posts during the move from phpBB to Discourse in early 2016.

0 Likes

#10

As a user searching for an answer, I did not see that anywhere in the solution.

Maybe @KES could update his post?
Thanks for the info, @FichteFoll.

0 Likes

#11

Well, if you understand JSON it should be pretty clear what is going on. I’ll admit that without knowing JSON you’re likely going to have a hard time with the various old code snippets on this forum, but you’re in for a rough ride with configuring Sublime Text anyway if that is the case.

I hope they teach JSON in school now, or similar. They certainly didn’t 8 years ago.

0 Likes

#13

I know this is a bit old but I can’t seem to find this answer on google. I use command+option+left (or right) arrow to switch tabs all the time. I’m 99% sure that in Sublime 3 when you were in column 1 and are on the last tab in that column then when you hit command+option+right it would go to column 2.
Now in Sublime 4 it just wraps back to the beginning in column 1.

I don’t want to wrap, I’d like to jump to column 2, anyone know what the fix is for this?? Thanks.

0 Likes

#14

Does it happen in safe mode?

0 Likes

#15

That’s indeed a new behavior of next_view and prev_view in ST4. I like this behavior better than the old one. Always had to use BetterTabCycling plugin in ST3 to achieve this behavior. Now it luckily works out of the box.

The old behavior often led to unexpected group changes, especially as ST fails to correctly render tabs if there are too many. The active ones are often hidden so it’s not so obvoius which one is the last of a group.

IMHO ST4 is out now for too long to simply revert this bahavior.

super+k, super+left or super+k, super+right can be used to switch focus between neighboring groups.

0 Likes

#16

Ah, the super+k left/right works, thank you. I wouldn’t request to revert it for ST4 but maybe an option to enable it? maybe?
Thanks.

0 Likes

#17

You can customise your keybindings to whatever you want them to be. See https://www.sublimetext.com/docs/key_bindings.html

0 Likes

#18

Just for reference. There’s an issue about this topic at

0 Likes

#19

ctrl+tab ctrl+shift+tab
next tab

0 Likes