Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sorting to Open Editors list #12453

Closed
ghost opened this issue Sep 22, 2016 · 123 comments
Closed

Add sorting to Open Editors list #12453

ghost opened this issue Sep 22, 2016 · 123 comments
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan open-editors Issues related to the OPEN EDITORS view
Milestone

Comments

@ghost
Copy link

ghost commented Sep 22, 2016

This could be simply optional alphabetic sorting. As it stands when you have lots of files open it can be hard to match up files that are associated (e.g. circus.component.js and circus.component.html) without the tedious task of manually dragging them into order.

@chrmarti chrmarti added feature-request Request for new features or functionality file-explorer Explorer widget issues labels Sep 22, 2016
@pamtbaau
Copy link

And while you are at it... Please add optional sorting of Git files too...

@kzh125
Copy link

kzh125 commented Feb 28, 2017

This feature is useful to find a file between many tabs.
VS can sort tabs alphabetically with the Productivity Power Tools.
1
Hope VSCode has this feature too...

@Ampakinetic
Copy link

Now that text selection dragging works, this is the only feature missing before VS code becomes the prefect IDE for me :)

@bpasero bpasero changed the title Feature request - Add sorting to Open Editors list Add sorting to Open Editors list May 28, 2017
@isidorn isidorn added this to the Backlog milestone Nov 17, 2017
@deathemperor
Copy link

+1

1 similar comment
@zen0wu
Copy link

zen0wu commented Jan 8, 2018

+1

@matthewvolk
Copy link

+1 :D

@nhustak
Copy link

nhustak commented Feb 16, 2018

+1

7 similar comments
@dpetratsch
Copy link

+1

@Montago
Copy link

Montago commented Feb 21, 2018

+1

@dgenin
Copy link

dgenin commented Feb 23, 2018

+1

@mikeoutlaw
Copy link

+1

@takafan
Copy link

takafan commented Apr 3, 2018

+1

@benwallis
Copy link

+1

@charlesr1971
Copy link

+1

@charlesr1971
Copy link

Where are we on this feature? It was first mentioned in 2016. Why the delay?
It is not only a very useful feature, but almost indispensable.
I am somewhat puzzled why VSCode was not shipped with this feature, originally?

@Hobart2967
Copy link

+1

2 similar comments
@mrwalruss
Copy link

+1

@two-bridges
Copy link

+1

@notalentgeek
Copy link

Is this possible to be made as a plugin? I am in need.

@cmacdonnacha
Copy link

+1

3 similar comments
@bbahes
Copy link

bbahes commented May 4, 2018

+1

@LuizAsFight
Copy link

+1

@harjeethans
Copy link

+1

@iniatse
Copy link

iniatse commented Mar 31, 2020

thank you

@charles-dexter-ward
Copy link

It seems the plugin does not accomplish the requested feature.
The order of Opened Editors shoud not be automatically reflected on the order of opened Tabs (and viceversa). I think it can be very confusing for the user which does not find a specific tab where it was before. I usually associate a specific Tab with one of the siblings and moving them could be quite annoying.

@iniatse
Copy link

iniatse commented Mar 31, 2020

Better then nothing... I can choose to disable it whenever I want. I mean this issue is more then 3 years, it seems that MS does not care at all or is not able to implement it idk.

@mva123
Copy link

mva123 commented Mar 31, 2020

Well.. now we have a starting point maybe the plugin developer is willing to add more features to the plugin to accomplish the original request?

The plugin (with the full path sorting off) will work for now.

@vandwalle
Copy link

vandwalle commented Apr 20, 2020

How are we on this feature? Has it somewhat been accepted and is this on a roadmap?

@jsmedmar
Copy link

Sorting by date modified could also be really useful. Use case: when you have tens of editors open and you want to close by latest modified or latest opened.

@Battlemarch
Copy link

+1

It's not always easy to get IT/Security to approve all these different plugins.
With opening 2-4 tabs for each component in Angular, this would be useful in the base VS Code.

@studgeek
Copy link

studgeek commented Nov 6, 2020

Also helpful would be grouping by directory. So it essentially would a tree view of just the open files.

@isidorn isidorn added open-editors Issues related to the OPEN EDITORS view and removed file-explorer Explorer widget issues labels Nov 10, 2020
@isidorn
Copy link
Contributor

isidorn commented Nov 10, 2020

Hello everybody, my name is Isidor and I work on VS Code.
I am pondering about adding this feature, however this issue has 100+ comments and I did not read all of them.
My suggestion on how to solve this:

  • Add a setting explorer.openEditors.sortOrder: editorOrder, alphabetical

The sorting would only be done within groups. So editors would still be split between GROUP 1 and GROUP 2...
The sorting will only have an effect on the OPEN EDITORS view. It will not "move tabs" in any way.
The default would be editorOrder and that is the current behavior. Not sure about the name though.

Bonus features:

  • Consider adding button in the Open Editors title area that would toggle between this sort setting values
  • Consider to add modified as a value to the sortOrder setting. Downside: Open Editors view has no dependency on fileService and currently does not do any stat calls, this would have to change then

I plan to discuss this in this weeks UX call with the rest of the team to see if my proposal makes sense.
Concise feedback is welcome here. Thank you

fyi @bpasero @misolori

@charles-dexter-ward
Copy link

@isidorn

I rewrite the (my :) ) need:

"The order of Opened Editors shoud not be reflected on the order of opened Tabs (and viceversa). I think it can be very confusing for the user which does not find a specific tab where it was before. I usually associate a specific Tab with one of the siblings and moving them could be quite annoying."

So, ordering the Open Editors for any criteria which will be decided should not rearrange tabs, and, on the other hand, rearranging the tabs should not change the order in the open editors.

@DonRhodes
Copy link

Hello everybody, my name is Isidor and I work on VS Code.

Isidor, the setting that you present sounds like what a lot of people have been looking for as a start. I can see people wanting more feature, reverse order, by extension, and other options that I am not thinking of; however the feature needs to start somewhere.

@cnanders
Copy link

cnanders commented Nov 10, 2020 via email

@coling
Copy link

coling commented Nov 10, 2020

Thanks @isidorn for taking on this task of improving things. Any improvement would be welcome and personally I would love to see two recently mentioned things in this ticket.

  1. Sort alphabetically with the extra bonus of favouring files called 'index.*'. I'm not sure if this need to be configurable or just a built in feature of alphabetical sorting.
  2. As per @studgeek's recent comment sorting based on the full tree would be my preferred option with bonus points for actually being able to show the open editors in a tree view. I think this is suitably separate from the Groups feature to mention it here. (that said, it might be more sensible to simply add a "Show open files only" toggle button to the Workspace tree view (next to 'New File', 'New folder', 'Refresh' etc.) instead which would achieve the same goal and perhaps with less code duplication. If this was possible, I'd probably not bother using the "Open Editors" view at all.

Just one more comment in the sea of this feature request! :-) Good luck.

@isidorn
Copy link
Contributor

isidorn commented Nov 12, 2020

Thank you for your feedback.
As mentioned in my comment above:
I have added a setting explorer.openEditors.sortOrder: editorOrder, alphabetical
The sorting would only be done within groups. So editors would still be split between GROUP 1 and GROUP 2...

The sorting will only have an effect on the OPEN EDITORS view. It will not "move tabs" in any way.

The default would be editorOrder and that is the current behavior.

For additional asks please file new feature requests and we will consider adding those as well (for example "modified" sort).
You can try it out in VS Code insiders from Friday, so try it out and let us know what you think. Thanks!

@isidorn isidorn modified the milestones: Backlog, November 2020 Nov 12, 2020
meganrogge pushed a commit that referenced this issue Nov 18, 2020
@isidorn isidorn added the on-release-notes Issue/pull request mentioned in release notes label Dec 4, 2020
@studgeek
Copy link

I created #114470 for sorting using the filename's full relative path as mentioned in a couple comments above.

@matkovski
Copy link

@isidorn Thanks a lot, that solves the problem, but unfortunately creates a new one. If I set explorer.openEditors.sortOrder to alphabetical the order of tabs and open editors is different - tabs are not re-sorted. Now, there are two main ways to switch between editors using a keyboard - Ctrl+Tab (go to previous or scroll through all) and (on Mac) Cmd+Shift+[ or ], and Windows would be Ctrl+Page down/up I imagine. While the setting does sort the way the editors are shown in the Open editors list, keyboard browsing still uses the original order. Also, the list that you see when pressing Ctrl+Tab uses the original order as well.

I imagine changing this behaviour or making it configurable would be a much bigger task than the quick fix you made, but it would be very helpful if we had a couple of new commands like the existing 'Open next editor' and 'Open previous editor', but which would respect this new setting.

@isidorn
Copy link
Contributor

isidorn commented Mar 29, 2021

@matkovski please file a new issue and we can continue the discussion there

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan open-editors Issues related to the OPEN EDITORS view
Projects
None yet
Development

No branches or pull requests