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.
And while you are at it... Please add optional sorting of Git files too...
This feature is useful to find a file between many tabs.
VS can sort tabs alphabetically with the Productivity Power Tools.
Hope VSCode has this feature too...
Now that text selection dragging works, this is the only feature missing before VS code becomes the prefect IDE for me :)
+1
+1
+1 :D
+1
+1
+1
+1
+1
+1
+1
+1
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?
+1
+1
+1
Is this possible to be made as a plugin? I am in need.
+1
+1
+1
+1
+1
Why isn't this just solved ??
Can't take more than 5 minutes to fix !!!
openEditorsView.ts contains two methods:
getList() and (getter) elements()
I would assume that the returned list simply needs to be sorted before returning ?
I dont know how to build or test if it works so someone who know how could take a look..
Go for it Montago. Let me know the results...
Just to let You know, it probably cannot be done with an extension as changing vscode.window.visibleTextEditors variable fails.
Also, it seems impossible to move editor other then active or activate some other editor.
It may be possible though to put an editor to the correct place right after activating it or to close editors with workbench.action.closeActiveEditor
and then reopen them in the correct order.
Looks like we will have to wait for the VSCode team to add this update. I think it is on their list?
Not sure if that's on their list, but for now I made an extension for that. It's not perfect, but should usually work.
I used a hack from eamodio which he shared here: https://github.com/Microsoft/vscode/issues/15178#issuecomment-283072868 . To get the list of opened editors the workbench.action.nextEditor
command is used. It makes it all quite slow, especially if some non-text editors are opened.
For now it should sort editors by the full path of a file. Maybe I, or someone else, will make some setting to change that behaviour in the future. Please let me know if that's crucial for You.
You can get it from here: https://github.com/mkasprz/vscode-editors-sorter/releases . I haven't published it yet. Let me know if it works for You. And feel free to improve it if You want.
To run it just search for Sort Editors
in command pallet.
Cheers. I will give it go...
+1
+1
+1
+1
+1
+1
+1 But my count of the above says we're around +1000. Also given that there's at least one PoC of this feature, I would expect the VSCode team to Just Do It.
+1
+1
+1
A comment by @bpasero (https://github.com/Microsoft/vscode/pull/38118#issuecomment-344166505) in another pull request indicates this type of functionality ought to be in editorStacksModel.ts. However, I am unable to locate said file in the source (am I being dense??). Can someone enlighten me as to where I might find editorStacksModel.ts?
Maybe it's now vscode/src/vs/editor/common/model/editStack.ts
This sure looks like the change belongs in vscode/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts:
https://github.com/Microsoft/vscode/blob/55ed150f27a9871ad3a2feb27f1390cf82a0badc/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts#L204-L223
The quick solution might be to sort inside getSelectedElements. Am I taking too narrow of a view?
Edit: I almost want to delete this as it suggests a change in just about the same spot @bpasero was uncomfortable with. Hopefully, the difference is this is an effort at a configurable sorting of the actual Open Editors view vs. an action taken when an editor is saved (#38118).
+1
+1
+1
Amazing after over 2 years, it has not been implemented!
I have like 26 files all opened at the same time. Not being to sort them is driving me nuts!
c'mon
+1
+1
The original design of VSCode was to not have tabs at all. That does indeed make perfect sense if one is able to sort the Open Editors view alphabetically [or by type, or just plain flow-order]. Please polish the original design concept by implementing this feature.
+1 👍
tons of people asking for the same feature, and MS doesn't even care... seems like MS didn't change that much
@LuizAsFight - do you think the sorted Open Editors view should also sort the tabs? i.e. should the tab order follow the Open Editors view order? If you manually rearrange your tabs, should that manually rearrange the Open Editors view order? How should the user be able to return to a "sorted" view? Should "Untitled-*" entries sort to the top or bottom? Should it sort strictly by Filename or Path+Filename?
@SlyW To give my opinion on your questions:
Also sort tabs - no, tabs are a different construct and should be handled separately.
Should tab order follow Open Editors order - no, see above.
Manually rearrange - no, see above.
Return to "sorted" view - not sure what this means.
Untitled - Top or bottom.
Filename or Path+Filename - filename, adding path would ruin the point of my original request.
@gecko-8 Thanks. "Return to 'sorted' view" was only relevant if the tab order should follow the sort order. As it stands right now (and as I am sure you are aware) the reordering of tabs does affect the Open Editors view. As such, the option to sort the Open Editors ought to decouple that behavior, correct?
@SlyW That would certainly be my preference but I could probably live with them being coupled if it's an issue.
Or tabs and open editors list can stay synchronized, and you have to pick your mode - manual order (as it is now), or sorted. In sorted mode you can't move the things around - whether in tabs or in open editors list. Or you can, but any attempt to rearrange editors turns off the sorted mode and you can switch it back on.
For me there could just be an option in right-click menu of any tab or editor: "sort editors alphabetically". Which means that editors and tabs should stay synchronized. It is quite important for me personally as I mostly use tabs, not the list of editors.
I also like @Andikki idea though as it allows keeping alphabetical order even when You open some new file.
Should it sort strictly by Filename or Path+Filename
Couldn't it be configurable in settings? There are different cases, both options seems reasonable.
@SlyW here are my thoughts
do you think the sorted Open Editors view should also sort the tabs?
R- Yes, I do. They are pretty much the same thing, I personally don't even use Open Editor List, if tabs are organized enough I don't need Open Editors list.
If you manually rearrange your tabs, should that manually rearrange the Open Editors view order?
R- Yes, they are pretty much the same thing.
How should the user be able to return to a "sorted" view?
R- No returns. If the user sorted the tabs and then changed some tab's position again, he can just re-sort the tabs.
Should "Untitled-*" entries sort to the top or bottom?
R- Great question, I would say bottom
Should it sort strictly by Filename or Path+Filename?
R- Both, it's nice to be flexible and just let the user choose. It depends a lot on the project framework
folder/files structure. For instance a react dev will probably have a lot of index.jsx|tsx files, so it's probably better path+filename. But an angular dev will have header.component.ts, header.component.scss, in that case he might prefer strictly by filename.
My suggestion:
When you right click any tab, you get the Menu: Close, Close Others, Etc...
Just add a new menu item with a submenu
I totally agree with @LuizAsFight with one addition. For the last point the same options should be available not just on the tabs but also in the Open Editors panel. I personally find tabs are only useful when you have a small number of files open, especially with side-by-side groups/panes. Once I have to scroll to find a tab, they're worthless. That's where the Open Editors pane shines. People shouldn't lose functionality if they choose one way or the other.
Just wanted to follow up on what @gecko-8 said about tabs. I know there is a danger of going off-topic here but I agree totally about how tabs only really work with a very small number of open files. I personally just turn them off completely which works for me.
On the topic of the open editors panel, I would personally love to see it as a tree view* rather than a flat list (something that kinda implies sorting in the same way as the full "Code" list). While I accept this won't be everyone's cup of tea, it would be great if this could be something that is either a) included or b) made possible by extensions. I appreciate a totally separate extension could be created to likely do this in a different view, but it would feel correct to include it here.
* I mean an intelligent tree view which collapses paths when appropriate e.g.
Foo/Bar/Oink/
Wibble.c
Grr.c
Or
Foo/Bar/
Oink/
Wibble.c
Grr.c
Fluff/
Lint.c
Dust.c
Is this feature being implemented or what? Geez, Eclipse has had that feature forever!
I'm selling my MSFT shares...
I would totally like to see the ability to float unsaved editors to the top of the list. It's frustrating to have to scroll through the list to see the indicator. I guess the other option is to use the Ctrl-Tab list, but really I think it would be better to have the functionality in the explorer tab. Alpha sort would obviously be a nice update as well.
+1. I need recent opened tabs always on the left. In the mean time, I'm satisfying with this extension
https://marketplace.visualstudio.com/items?itemName=mpontus.tab-cycle
@hoangpx Not sure if this is what you mean but you can set VS Code to open new tabs on the left with the setting:
"workbench.editor.openPositioning": "left"
+1
+1
+1
+1
+1
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.
+100000000000
+1
Please add this!
+1
+1
This seams to be completely ignored....
Man...this is really really really annoying, especially in Angular where there are multiple parts named the same except for extension...and they are all over the bar.
This feature would be very useful to not get lost in all my open files.
+1 svp!
+1
+1
Probably be nice if it marked/highlighted unsaved files in the explorer tree as well, I think.
Probably be nice if it marked/highlighted unsaved files in the explorer tree as well, I think.
Well, they already have a bullet.
Probably be nice if it marked/highlighted unsaved files in the explorer tree as well, I think.
Well, they already have a bullet.
Not in the tree they don't. It's just in the Open Editors section.
@fractos Can I suggest creating a new feature request for this? This request is specifically about the Open Editors list.
@gecko-8 Of course. It just occurred to me and I didn't want to forget about it.
@fractos No worries, just want to keep the issue focused so there might be an outside chance of it getting implemented :)
Was just going to open this issue but it seems to have been requested for the last 3 years! :)
Anyway, I'll just paste it here...
I'd like to request an option to sort Open Editors alphabetically and ideally sync editor tab order (configurable..?). Reason: For example in Angular projects each component has 4 similarily named files (TypeScript, Style, Test, HTML) which quickly become randomly mixed up and frustating to find in open tabs and editors. The only workaround at the moment is to close all files every couple of hours.
Thanks.
Managed to reproduce OPEN EDITORS not sorting when dragging files into VS Code.
https://github.com/microsoft/vscode/issues/80681#issuecomment-539862813
Please really consider adding this (even with an optional activation). It is very much needed.
In the meantime, I've published a quick-and-dirty extension to have this feature: https://marketplace.visualstudio.com/items?itemName=omagerio.tabsort
Yes, I think that makes sense
Add an option whether to automatically sort new tabs, or manually sort each group.
Maybe right-click on the group and select "Sort Alphabetically".
And, this issue has been open for over 3 years, could we please have this feature now... :/
please hurry up , thanks
Adding my +1 to this as well. Opened up a bunch of .h and .cpp files in one go and to my horror I found that a.h
and a.cpp
aren't paired up in the tab and "Open Editors" view. Please fix :-)
+1
needed feature! I have too many files open and have stopped using tabs, so this is a must! Keep up the great work! VSCode is the best thing ever to be produced by a human being!
+1
Is this issue also related to edt
list (workbench.action.showAllEditors
) in the command panel?
Either way, I'd separate the sorting setting for the list in explorer, and the list you invoke from command panel.
And also support most-recently-edited (MRE), and/or most-recently-viewed/opened sorting.
Would love to have the feature of being able to sort the list of files in Open Editors window! Love VS Code and this would REALLY be awesome! Thanks!!
+1
+1
+1
Will this be implemented this year? This is probably one of the most requested features in vscode...
There is a plugin to sort the tabs by default alphabetically, but you can not choose to order by last opened... which I would love to have...
@EmTee70 which one? please tell me
Just looked it up, I found: Sort Tabs/Open Editors by name | https://marketplace.visualstudio.com/items?itemName=omagerio.tabsort
@EmTee70 which one? please tell me
DonRhodes was faster! :-)
thank you
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.
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.
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.
How are we on this feature? Has it somewhat been accepted and is this on a roadmap?
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.
+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.
Also helpful would be grouping by directory. So it essentially would a tree view of just the open files.
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:
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:
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 thenI 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
@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.
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.
@isidorn,
I agree that your proposed solution is what the majority of people are looking for in v1. Thank you for your generous work on this project!
On Nov 10, 2020, at 05:10, Don notifications@github.com wrote:
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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/12453#issuecomment-724691790, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADFKFFPIVPGUCSHFO5LRN3SPE3VPANCNFSM4CQPY2BQ.
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.
Just one more comment in the sea of this feature request! :-) Good luck.
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 beeditorOrder
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!
Most helpful comment
Was just going to open this issue but it seems to have been requested for the last 3 years! :)
Anyway, I'll just paste it here...
I'd like to request an option to sort Open Editors alphabetically and ideally sync editor tab order (configurable..?). Reason: For example in Angular projects each component has 4 similarily named files (TypeScript, Style, Test, HTML) which quickly become randomly mixed up and frustating to find in open tabs and editors. The only workaround at the moment is to close all files every couple of hours.
Thanks.