Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code - Can "OPEN EDITORS" panel be sorted?

Sometimes when I'm working I end up with several open tabs. My problem is that every time I need to switch to another file I need to constantly scroll until I find the desired file (which is not always easy to find).

For example, I may have over 30 open files, but I'm currently working only on 3 - 5 on which I constantly switch.

Those files should be kept together at top (sorted by last used/saved) instead on the date they were first opened.

Top tabs aren't sorted either.

Android Studio does a better job on this, so I thought Visual Studio Code may have a preference for it.

Is there a property to change this? I couldn't find a hint on settings.

enter image description here

like image 385
htafoya Avatar asked Mar 28 '19 05:03

htafoya


People also ask

How do I move the sidebar to the right in VS Code?

Conversation. VSCode tip: You can move the sidebar/file explorer to the right-hand side of your editor via View > Appearance > Move Side Bar Right. Try it out, and give yourself enough time to get used to it. If you're anything like me, you might find it makes a lot more sense there.

How do you Auto Arrange in VS Code?

On Windows Shift + Alt + F. On Mac Shift + Option + F. On Linux Ctrl + Shift + I.

How do I change the order of files in VS Code?

If you want to change it, click the upper left menu File > Preferences > Settings and search for “explorer. sortOrder”. A dropdown lets you select from five possible options: default – Files and folders are sorted by last modified date, in descending order.


2 Answers

Update 2020-12-16

With release v1.52.0 being shipped you can sort open editors. From the release notes:

There is a new setting explorer.openEditors.sortOrder to control the sort order in the OPEN EDITORS list.

The values are:

  • editorOrder - Editors are listed in the same order as editor tabs are shown (default).
  • alphabetical - Editors are listed in alphabetical order inside each editor group.

Update 2020-11-16

It seems this will be possible with the next November release v1.52.0 (Reference). This release is expected to be shipped early December 2020.

Original Answer

This is currently not possible.
However the VS Code team is aware of this feature request and it can be tracked here.

like image 136
HaaLeo Avatar answered Sep 21 '22 18:09

HaaLeo


Steps:

  1. In the Visual Studio Code menu bar, click on File
  2. Click on Preferences
  3. Click on Settings
  4. Click on Features
  5. Go down to Open Editors: Sort Order
  6. Select: alphabetical

Make sure you are using a release from December 2020 or later. (On the menu bar click Help, then About to see what release you are using.)

like image 41
Reid Avatar answered Sep 19 '22 18:09

Reid