Visual Studio Code: Hotkey to move a tab from its current location to the very front?

Viewed 2969

Sometimes I have 20+ file tabs open and I want to move the one i'm currently working on to the very front. Dragging and dropping takes too long. Is there a hotkey to do this in?

From this enter image description here

To this enter image description here

3 Answers

EDIT!

A quick look at the short-cut menu revealed this shortcut: Move Editor Left. This will move the current tab one space to the left, and is pretty quick to move the tab to the front.

The default key binding for this in Windows is Ctrl+Shift+PageUp while the Move Editor Right key command on Windows is Ctrl+Shift+PageDown.

The default key binding for Move Editor Left on macOS is ⌘K ⇧⌘← while the default for the Move Editor Right command is ⌘K ⇧⌘→

Unfortunately, there doesn’t seem to be a command to move the editor to the first tab.


This isn't completely automated, but it is a bit faster than a simple drag & drop.

Right click on the tab you want to move and select Split [Up, Down, Left, Right] (whichever you prefer)

Right Click on desired tab

After you do this, on the other page, scroll to the first tab, select it. (This is important!), then click on your split out tab and drag it over to the front.

Drag desired tab to the front

Again, it isn't a (much more desirable) short-cut, but it works well enough for now.

In Sublime Text there is is an extension do to the job, but I could not find the similar extension in VSCode, so finally I made one, I was posted here but since I was the owner of the extension, the reply has been hidden by someone else.

You can search "movetab" in VSCode extensions to get it.

*I keep posting is not because I made that extension but just because I believe it can help people. it's a very simple and open source extension, you can find the github repo from VSCode extension marketplace.

Related