21

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

36

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.

  • 2
    and for mac users the hot keys are cmd+opt+shift+left and cmd+opt+shift+right – sfletche May 24 '18 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 Jul 25 '18 at 6:24
  • Nice! Now my Sublime Text acts the same way as Firefox and Gnome Terminal =) – xjcl Apr 6 at 21:43
  • For anyone else who wanted to modify the keybindings for MoveTab - See stackoverflow.com/a/32532584/2033526 – i2097i May 17 at 18:37
4

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
    You will find this is a common macro among tabbed programs such as text editors and browsers – Mercer Aug 9 '18 at 2:17
  • this works for me! – the-breaker yesterday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.