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
To this
You can switch between views using ctrl + 1 ( ⌘ + 1 ), ctrl + 2 ( ⌘ + 2 ), and so on. Alternatively, you can switch between tabs (and, by extension, between views) using ctrl + page up / page down ( ⌘ + page up / page down ).
1. Ctrl+Shift+P, F1 ⮕ Show Command Palette. This shortcut opens the command palette in the vs-code, where we can search for the other commands.
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)
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.
Again, it isn't a (much more desirable) short-cut, but it works well enough for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With