73

Anyone notice that the default ctrl+tab doesn't work like the typical consecutive tab switching from left to right, e.g., in Chrome? I'm trying to switch to the next adjacent tab, but it seems to jump around (alphabetic order I think).

How can I change the order in which sublime switches tabs?

roulette01
  • 1,984
  • 2
  • 13
  • 26

3 Answers3

112

The default behavior is to goto tab you have used at last. Just add this keybinding to your user keybindings:

{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
r-stein
  • 4,627
  • 2
  • 16
  • 27
  • Using Ctrl+Tab to switch between two files is pretty useful, so I like to keep it. As Christhofer wrote in his answer, Ctrl+Up/Down works as OP expects. – oferei May 20 '19 at 14:43
  • 12
    To Open User Key Bindings: Preferences-->Package Settings-->Sublime Input -->Key Bindings -User – Crazy-Kaleidoscope-7 Jul 14 '19 at 02:50
  • 3
    In Sublime Text 3.2.2 in 2021, user key bindings are just in Preferences -> Key Bindings. – Noumenon Feb 15 '21 at 17:16
  • Note that settings and key bindings are two different "pages"/json files. I didn't realise this at first and tried to put the above in the settings file. Both settings and key bindings can be reached from preferences on the top banner. – Anton Aug 12 '21 at 19:26
  • 1
    @oferei in sublime Build 3126 linux version, it's +/, maybe you mistyped – j.c Nov 17 '21 at 12:17
  • For anyone facing an "Error trying to parse file: Unexpected trailing characters" error just put the above in an array [ { "keys": ["ctrl+tab"], "command": "next_view" }, { "keys": ["ctrl+shift+tab"], "command": "prev_view" }, ] – Rohan Lekhwani Feb 12 '22 at 15:58
19

In sublime text 3, there is shortcut to switch tab in similar to ctrl+tab in browser.

{ "keys": ["ctrl+pagedown"], "command": "next_view" },
{ "keys": ["ctrl+pageup"], "command": "prev_view" },

While this ctrl+tab has behavior similar to windows alt+tab to switch apps. CMIIW.

{ "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },

You can just make custom key binding and swap them around.

And for anyone looking for shortcut to move tab to left & right, there is a plugin for that.

Christhofer Natalius
  • 2,727
  • 2
  • 30
  • 39
  • Would you or anyone know what would be the commands to cycle through all the tabs in all the panes (not just in the active pane)? – Michał Lepczyński Nov 09 '21 at 14:51
  • @MichałLepczyński What do you mean by panes? If you are talking about View > Layout > Columns, `ctrl+pagedown` will bring focus to next column once you reach the most right tab. And if you want to go to 2nd column directly, you can press `ctrl+2` – Christhofer Natalius Nov 10 '21 at 03:10
  • Sorry, not `~~panes~~` but `groups` I think (e.g. cols/rows). For example when you use `origami` package, you can divide columns or rows into more elaborate divisions. It would be grand to have, say ctrl+tab cycle through them in recency order (just like operating system's alt+tab), so that you can use a few that you transfer text into/from (selecting them e.g. w/ a mouse to modify recency). I know I can use a shortcut for the group (ctrl+digit) and then alt+digit for a tab in that group but that is not enough for me when I have more of them, especially with long filenames. Is that clearer? – Michał Lepczyński Nov 12 '21 at 02:06
  • @MichałLepczyński I don't think I have ever seen feature like that. If I need to find a specific file in a pile of opened tabs, I just use `ctrl+p`. – Christhofer Natalius Nov 12 '21 at 04:22
  • Maybe I'm talking about a bigger pile. Say 7 groups with ~6 files each, except 2 groups that have >12. `ctrl+p` doesn't do the trick for me to quickly establish a temporary workflow between just a few but thanks. – Michał Lepczyński Nov 13 '21 at 22:22
5

please try command + shift + ] .This will bring you immediately to the next tab.

Command + Ctrl + P : Switch between the projects that are listed on the sublimeText Sidebar.

Techiescorner
  • 791
  • 2
  • 12
  • 25