Folder Sort Rules
pendingby Adam
Define custom sort orders per folder, overriding the global file explorer sorting with independent rules for files and subfolders.
Folder Sort Rules
Define custom sort orders per folder in your Obsidian vault. Override the global file explorer sorting with independent rules for files and subfolders.
Features
- Per-folder sort rules — Set a different sort order for any folder in your vault.
- Independent file/folder sorting — Choose separate sort orders for files and subfolders within the same folder.
- Recursive rules — A rule can apply to all nested subfolders unless overridden by a more specific rule.
- Manual drag & drop — Reorder files or subfolders manually via drag and drop in the file explorer.
- 7 sort orders — Name (A→Z), Name (Z→A), Modified time (new→old), Modified time (old→new), Created time (new→old), Created time (old→new), Manual.
How to use
- Go to Settings → Folder Sort Rules.
- Click + Add rule and select a folder from your vault.
- Choose the desired sort order for files and subfolders independently.
- Toggle Apply recursively to extend the rule to nested subfolders.
- If you select Manual (drag & drop), you can reorder items directly in the file explorer.
Rule resolution
When displaying a folder, the plugin resolves which rule to apply:
- Exact match — If a rule exists for this exact folder, use it.
- Recursive parent — Walk up the folder tree and use the first parent rule that has recursion enabled.
- Default — If no rule matches, use Obsidian's global sort order.
The most specific rule always wins.
Installation
From Obsidian Community Plugins
- Open Settings → Community plugins → Browse.
- Search for Folder Sort Rules.
- Click Install, then Enable.
Manual installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Create a folder
folder-sort-rulesinside your vault's.obsidian/plugins/directory. - Copy the downloaded files into that folder.
- Enable the plugin in Settings → Community plugins.
Development
npm install
npm run dev # watch mode
npm run build # production build
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.