-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Custom File Explorer Order #183155
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
base: main
Are you sure you want to change the base?
Custom File Explorer Order #183155
Conversation
@microsoft-github-policy-service agree |
I don't think this is the solution we want. It feels super hacky to me to have to list out your files this way. How does this work if your file is in a folder? Do I have to list out the whole path? I wanted a way to statically define sort rules in a robust way to fit everyone's custom sort requirements, but have not found one yet. |
You don't have to list the whole path, for example, if I add "index.ts" to the list, it will appear on top of the repository in any folder it is in. I'll link some images for you to see how it looks like with some different rules. EX1: Ordering CRUD folders: EX2: Always placing index.ts on top. EX3: Ordering files and folders in a way that the folder 'database' will always appear on top following 'index.ts' I think I can improve this by instead of just passing a plain string, enabling the user to provide a regular expression, so it will be much more flexible, what do you think about that? |
I was today trying to do exctly that as an extension and I found it is not possible to change File Explorer by extensions. It is suitable to me as I want index.ts to be at top of the files list because I will have a lot of those files in folders that I use as modules. It is very annoying to have a lot of index files in the middle of other more relevant files like that: I think maybe the match string could be a regex, so we could do more broadly combinations using names of folders |
This would also be useful in Rust for |
This PR addresses one of the issues from #27286 and fixes #25724.
This new configuration provides users with enhanced control over their coding environment. By utilizing this feature, developers can customize the organization of their file explorer based on their preferences. Files and folders matching the specified list will be displayed with priority, following the specified order.
This functionality enables developers to navigate their codebase more efficiently by tailoring the file explorer to suit their individual workflows. Whether it's prioritizing specific files, focusing on particular folders, or grouping related elements together, users have the flexibility to optimize their coding experience.
To test it, just go to Settings (File → Preferences → Settings) and search for: explorer.customOrder. Add file or folders names to the list and see them go to the top of their directory.