24

Is there a way to move/reposition a tab using the keyboard? I know I can switch tab using ALT + LEFT/RIGHT, and I would like to be able to move them maybe using ALT + SHIFT + LEFT/RIGHT.

Is this possible?

mjs
  • 21,431
  • 31
  • 118
  • 200
  • install "TabMover" on "Preferences > Plugins", it's a shame that you need to install a plug-in to accomplish this... – 7ynk3r May 08 '19 at 22:39
  • @7ynk3r - TabMover unfortunately doesn't work for me (currently on Ubuntu 19.10). Does it work for other people reading this? – kramer65 Mar 30 '20 at 13:57
  • @7ynk3r Try move tab left and right using the keyboard plugin by momomo – mjs Mar 30 '20 at 17:41

8 Answers8

11

The plugin TabMover has been working for the past few years in WebStorm. (I last checked January 2019.)

You can install it directly from Preferences > Plugins. Just search for TabMover


On MacBooks the default keybindings are Cmd-Opt-Shift-Left/Right

But you can remap them to Ctrl-Fn-Shift-Up/Down if you want:

Under Preferences > Keymap search for Move Tab To Previous and Move Tab To Next


Incidentally, if you are a Mac user, and you want the same behaviour for tabs in Google Chrome, I can recommend the extension Keyboard Shortcuts to Reorder Tabs. Firefox works out-of-the-box!

joeytwiddle
  • 29,306
  • 13
  • 121
  • 110
7

There is no built-in keyboard shortcut for this functionality as of the latest 2017 build.

You can vote for it in the issue tracker though.

user2357
  • 452
  • 5
  • 11
  • There is a plugin for this, https://plugins.jetbrains.com/plugin/8443-a-move-tab-left-and-right-using-the-keyboard-plugin--by-momomo-com – mjs Dec 29 '17 at 12:01
  • 2
    This plugin is mentioned in the issue and works: https://plugins.jetbrains.com/plugin/10131-tabmover (the one mentioned by mono doesn't seem to work in all jetbrains products judging by the comments) – olejorgenb Oct 03 '18 at 13:51
5

I'm not sure if you can move the actual tabs. However if you use CTRL + TAB you get the same functionality you would see by doing ALT + TAB on Windows.

Meaning you can hold the key combination to find a tab you want to quick swap with, and then just press the key combination to switch back and forth.

  • Yeah, but I am thinking of organizing my tabs. Problem with Intellij is that they are always disorganized. What I would like is to also make pinned tabs unclosable but I don't think that is possible either. – mjs Oct 08 '14 at 15:59
  • @SecretService Pinning the tab will prevent IDE from closing it automatically (e.g. when limit of opened tabs is reached). There is no settings to make any tab non-closable. – LazyOne Oct 11 '14 at 19:07
  • 1
    @LazyOne Such a waste of a "feature" – mjs Oct 12 '14 at 14:30
  • There is a plugin for this: https://plugins.jetbrains.com/plugin/8443-a-move-tab-left-and-right-using-the-keyboard-plugin--by-momomo-com – mjs Mar 30 '18 at 15:35
5

My research suggests there's no way to do this (currently). There is a "Move Right" and a "Move Down" but that just splits the tab groups vertically and horizontally, respectively. There's no key binding that seems related to this, either.

Perhaps suggest it as a feature: https:// youtrack.jetbrains.net /issues/IDEA/ (they have a bad cert so I don't want to link directly)


There's a plugin for this that you can install: http://www.smardec.com/products/idea.html

Unfortunately, it doesn't work in Intellij 13 (gives runtime errors)

Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
  • 1
    Yeah, I tried this plugin but unfortunately it seems it no longer works ( Intellij 13 ) :( – mjs Oct 08 '14 at 16:00
  • 1
    @SecretService yeah I just noticed that :T Perhaps email the guy or modify the source (last resort) – Daniel Kaplan Oct 08 '14 at 16:01
  • Yeah, i will send him an email! – mjs Oct 08 '14 at 16:45
  • @momomo I so want this plugin but it doesn't work in WebStorm 2017.2 – JoshuaDavid Aug 09 '17 at 21:19
  • yes, i've heard. this is the shit that intellij is. there used to be great plugins and intellij was even better in 2008 but they continue to make updates and break older plugins. we'll try to look into it when we have time. we are still on 16 as of now so we see no reason to update. we'll try to do it soon though. – mjs Aug 11 '17 at 21:09
  • @FireCoding Send me an email to the plugin mail. – mjs Aug 14 '17 at 19:01
2

My workaround for this is to set keyboard shortcuts in IntelliJ for

  1. Move to opposite group
  2. Move right

What these keyboard shortcuts do: Move to opposite group: (moves your tab to the other tab is the window is already split. Does nothing if there is no split tab.) Move right: (this splits the current tab in half, and moves your current tab to the other half) So, when there are no tabs, use the keyboard shortcut for move to right, and if there is one already, use move to opposite group.

To set keyboard shortcuts, open settings (Ctrl + Alt + S), and go to Keymap. Just search for "move right" or "move to opposite group"

I set mine to ctrl+numpad7 and ctrl+numlock respectively.

Ben Butterworth
  • 22,056
  • 10
  • 114
  • 167
1

There is a plugin for this since a while back:

https://plugins.jetbrains.com/plugin/8443-a-move-tab-left-and-right-using-the-keyboard-plugin--by-momomo-com

mjs
  • 21,431
  • 31
  • 118
  • 200
0

Ok so this is an old post but in Pycharm 2018 you can create a macro to move a tab left or right and assign a keystroke combination to it. Edit>Macro>Start macro recording

-1

By default, it seems that Alt+Right/Alt+Left is now doing the job: https://www.jetbrains.com/help/webstorm/using-code-editor.html

enter image description here

For me, I use Alt+Left / Alt+Right to navigate through locations. So I have set Alt+Ctrl+Left/Alt+Ctrl+Right to move between tabs.

enter image description here

  • 4
    This is to select the next/previous tab. The question was about moving the tab. You are going to need a plugin for that. – mjs Mar 30 '18 at 15:34