Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Custom Explorer SortNew to Visual Studio Code? Get it now.
Custom Explorer Sort

Custom Explorer Sort

FlyweightSoft

|
12 installs
| (1) | Free
Re-order files and folder as you wish in VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Custom Explorer Sort

Sort files and folders in VS Code’s Explorer using a simple .order file at your workspace root. It respects .gitignore, adjusts mtimes safely, and logs to the “Custom Explorer Sort” Output channel.

Install from the VS Code Marketplace

What it does

  • Items listed in .order appear first, in your order
  • Pattern lines with (regex) use glob-like matching (minimatch)
  • Everything else follows alphabetically
  • Ignores anything excluded by .gitignore (and always ignores .git/)

How it works: the extension temporarily sets Explorer sort to “modified” and bumps mtimes with ~1.1s spacing to ensure a stable order; it restores your sort on deactivate.

Quick start

  1. Create .order in your workspace root.

Example .order:

README.md
src
docs
(regex)**/*.test.ts
(regex)*.json

Behavior:

  • The three listed entries are pinned first (in that order)
  • Then any file matching the patterns (e.g. all *.test.ts, all *.json)
  • Then the rest of the workspace, A→Z

Tip: Matching is checked against both the filename and its path relative to the workspace root.

Commands and notes

  • Command: “Custom Explorer Sort: Apply Order Now”
  • Works in folder workspaces on VS Code 1.96.0+
  • Save any file or change .order to re-apply automatically

License

MIT — see LICENSE.md.

Contact: FlyweightSoft • santhosh@flyweightsoft.com

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft