-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Explorer / Opened Editors Sorting #27286
Comments
Want to add one more; |
agree with the "file filtering" feature - with and without sorting |
I would like to have an option to sort the opened editors list by alphabetical order. To be honest, I don't know why that is not the default. The current sort order doesn't make sense to me (and never helps me to find what I want). |
Working with TypeScript, it would be great to have the barrels (index.ts) sorted at the top. |
Everything to complete an IDE is perfect for me! Organization is all in one project! |
to add to #12345 |
@Macromeda Check my issue #23231 |
@slowaways my idea is to make a json that holds the actual names of the files in the project folder, not ordering by characters. |
We really need this feature. Alphabetical sorting in the Open Editors panel. Thanks... |
Ordering by path would be my ideal. When working with huge repos, sorting by alphabetical filename wouldn't cut it as I like to keep my editors organised by where they appear in the codebase. e.g. this...
would be much more useful (to me) than this...
This is especially true when working on goliath monorepos. |
Maybe the default ordering is TextNoCase ASC? A-Z. It is parsing the file name as text rather than a numeric? |
Looks like is parsing as numeric instead; has is the output of |
I don't know if this has been suggested before (or even if it's possible with an extension) but I always prefer to keep the open editors list managed as a mini-tree. i.e. identical to the main folder/files views, but only for open files. I appreciate you can see the folder paths after the file names, but the code I work on has so many similar/identically named files (where only the path differs) that this "extra" data is actually the most important part to me. |
I've filed this issue against the strange sort order: "File extensions affect Explorer's sort order" |
Use case: I have writing projects (ex: user manual, journal article, book) with sections, sub-*-sections, files. I frequently reorganize the sequence as I work, drag, insert, delete, regroup. I want my work in the explorer to be in the desired sequence without having to rename anything. Probably no one "best" way to do this, so create an API through which the item-by-item sequence of items in the explorer can be specified, which will allow extensions to provide various options. It should probably also enable a little sort menu so that the sort can be switched with just a click: default <> global:myjsprojects <> global:mytaxprojects <> recents <> local:custom1 <> local:custom1:todo I would probably like direct drag-and-drop reordering (that remembered my custom order when switching between custom and other sort orders), but that might risk hard-coding something someone doesn't like. Maybe I wouldn't like it. So, I'd probably be just as happy with a |
Related: #119207, #91843, #95239. Related questions on Stack Overflow:
Related on r/vscode: Is there a way to sort files manually? |
I'm still waiting for the ability for sorting index files. It is clear that the PR shouldn't be specified only to javascript, but this modification does not look like something complicated. It's possible to add a custom setting that accepts an array of files to be placed at the top of the tree. If I add this feature, will the PR be accepted? |
Probably not. In this thread 3 years ago I did part of a PR A Backwards Compatible, Future-Proofed, ~20-line API Proposal and nothing happened, not even a comment. |
This issue seems to mention a few different sorting needs. I'm trying to sort all of the top level folders/directories/repos in my Explorer > Workspace in the sidebar. Is this currently possible with or without an extension? I can't figure out a way to do it. |
I think that being capable of specifying the order of files in the file explorer is very much a needed feature. I am currently working on a nuxt3 + firebase project and the root directory is getting flooded with folders that are in just random order without any respect what's vue what's css what's logic. I really like the way #119207 solves this issue with the API proposal 1. |
I'd pay for this one #40679 :)
instead of
|
You'll have to pay to buy all of Microsoft to do anything about this. It's easy to keep a subscription to this thread, but I don't think it's ever going to change, we've been waiting 7 years already and they've had multiple PRs and offers of help. Never any constructive feedback. Oh and no extension can perform this behaviour because those APIs are not open to extensions. |
They've actually closed so many duplicates that as far as I can see there is no open issue left that is requesting the custom sort order people are asking for. This issue just lists all related issues and doesn't mention what its own intention is. Can someone find an open issue that is still asking for custom sorting options or extension API? They keep closing issues saying they don't accept PRs without discussions first but I've been talking about it for 5 years. I have a PR and so do others and they keep saying we need to have community discussions. #141225 and #73930. There is a (relatively) new PR but it doesn't mention an issue #183155 |
@AmbrosiaDevelopments is there a way to hack this into the editor so that people can unblock themselves? For example something like this. We could at least document how people can solve this unofficially. |
That's really interesting, I've never seen that before so I'm not sure just yet. It might take me a couple of weeks to get around to it but I'll give it a shot. |
As I have said, I think LSPs or other extensions should also be able to provide custom sorting, hiding and nesting logic for the file explorer. Then extensions will be able to provide some custom logical "view"s beside the default view in the file explorer. Extensions can already handle the nesting. It will remove the need of some custom file explorer widgets. For example, F# projects have their files included (and thus compiled) in a specific order. Now a separate widget is needed to show files in that order. If it was available in the file explorer, the separate widget would not be needed. |
It's been almost 7 years since this issue was opened and there is still no solution. |
Hi @lramos15, as per comments from @isidorn on #73930, could we please have a conversation about the change proposed by the PR? I have followed the patterns of the existing options and added tests and can see no adverse impacts. This issue we're now talking in doesn't have a purpose at the moment so can we bring the discussion around to this PR and what would be required to get something like this approved and merged? No other issue listed in the first comment is still open except to align behaviour to OS automatically. Do we need to open a new issue or a new PR covering more options than just index files? Would a pattern matching solution be more appropriate for broader coverage of everyone's wishes? |
@AmbrosiaDevelopments We understand this is a highly requested ask. What I'm trying to figure out is how to do this is an extensible way that covers everyone's use case as there are a lot of different desired sorting orders. There's two problems with extension API. The first is the extension host can be slow, leading to us being unable to render the tree at all until we get a sort order from the extension. The second one is how multiple extensions contributing a sort order interact. |
@lramos15 Have each extension register a sort-order names based on their extension ID. Ex: Then, in settings, let users pick the order that sorts are applied in: settings.json {
"explorer.sortBy": [
"foldersFirst", // highest priority
"username.extname:alphabetical"
]
}
I'm personally fine with it being slow. |
Issue 199676 should be reopened. I'm commenting here because not only was it closed, but also locked to comments, for no good reason. Note that the default, out-of-the-box sorting of files, without tinkering with settings, should be a reasonable one, and it currently isn't. |
I wanted to make an extension that does something like this, but I don't think it is possible with the current VS Code API's. The closest extension I could find was this one by Qing Shun, but it just switches between 2 sort options in the VS Code settings. Commenting here to keep myself updated. |
@kai-353, the only way to do it for the foreseeable future is to fork vscode for yourself, add any one of the solutions we've made as PRs in here, and keep it up to date when things change upstream, building locally. |
@kilianc can you use Explorer file nesting for this? It first appeared in April 2022. |
@gjsjohnmurray, that is a completely different use case and wouldn't help with reordering, it would create annoying multilevel twisties to have to open and close all the time. #40679 should not have been closed. |
Numerous issues have been filed on this topic, merging them into one.
Done
Open
The text was updated successfully, but these errors were encountered: