30

In Sublime Text 3, is there a way to reorganize tabs using keyboard only?

I know you can switch a tab from a pane to another pane using for example ctrl+shift+2 to move a tab from pane X to pane 2 but it's not exactly what I am looking for.

I am looking to move a tab in its pane. For example, I have 3 tabs and I want to interchange tab 1 and 2. It's doable using the mouse but I have not found any keyboard shortcut for it.

Tabs in their original position

Tabs in position 1

Tab 1 has been moved one the right

Tabs in position 2

2 Answers 2

48

Nope. However, the following plugin will give you that functionality.

https://github.com/SublimeText/MoveTab

You can install it by pressing Ctrl+Shift+P (Command palette), type/select Package Control: Install Package, then MoveTab.

Then you can immediately move tabs with Ctrl+Shift+PgUp and Ctrl+Shift+PgDn.

5
  • 2
    and for mac users the hot keys are cmd+opt+shift+left and cmd+opt+shift+right
    – sfletche
    Commented May 24, 2018 at 18:40
  • 1
    Also this plugin provides Move Tab: To first position & Move Tab: To last position commands in the command palette, which is very useful if you have a large number of tabs open and want to quickly move a tab to the first or last position.
    – Ghos3t
    Commented Jul 25, 2018 at 6:24
  • Nice! Now my Sublime Text acts the same way as Firefox and Gnome Terminal =)
    – xjcl
    Commented Apr 6, 2019 at 21:43
  • For anyone else who wanted to modify the keybindings for MoveTab - See stackoverflow.com/a/32532584/2033526
    – i2097i
    Commented May 17, 2019 at 18:37
  • I was hoping to move tabs between panes in the split-pane view. That is not what MoveTab does just in case that saves anyone 60 seconds.
    – Slbox
    Commented Jul 20, 2020 at 20:00
8

On a related note: while this is not the answer to your exact question, many people landing on this page (myself included) may be looking for how to switch tabs with the keyboard.

Here's how to do that:

  • Tab navigation:
    • Cycle through open tabs in the order they were opened = Ctrl + Tab / in opposite order they were opened = Ctrl + Shift + Tab
    • Cycle through tabs to the Left / Right = Ctrl + Page Up / Page Down

Source where I learned some of that: https://forum.sublimetext.com/t/switching-tabs-with-keyboard/427

1
  • 1
    You will find this is a common macro among tabbed programs such as text editors and browsers
    – Mercer
    Commented Aug 9, 2018 at 2:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .