Custom File Explorer sorting

by SebastianMC
5
4
3
2
1
Score: 77/100

Description

The Custom File Explorer sorting plugin enhances the organization of notes and folders within Obsidian by providing flexible sorting options. Users can arrange items manually through drag-and-drop or configure custom sorting rules via YAML front matter. The plugin supports various ordering methods, including alphabetical, numerical, date-based, and metadata-driven sorting. It allows different sorting rules for individual folders and provides inheritance capabilities. Users can mix manual and automatic ordering, group items by attributes, and utilize bookmarks for easy access.

Reviews

No reviews yet.

Stats

475
stars
200,488
downloads
37
forks
1,411
days
166
days
393
days
45
total PRs
6
open PRs
3
closed PRs
36
merged PRs
139
total issues
14
open issues
125
closed issues
20
commits

Latest Version

a year ago

Changelog

#216 - bugfix for broken sorting by metadata when one or both metadata are boolean false

README file from

Github

This is a simple version of README which highlights the basic scenario and most commonly used feature

The long and much more detailed advanced-README.md is here


Freely arrange notes and folders in File Explorer (https://obsidian.md plugin)

Take full control of the order of your notes and folders by:

  • config-driven sorting with wide variety of options, allowing the fullest range of fine-grained ordering, or
  • drag and drop via bookmarks integration.

The simplest usage scenario is to sort items via drag and drop:

Drag and drop ordering simplest example

Another typical scenario is to apply different sorting order per folder:

Idea of different sorting order per folder

For detailed instructions and videos go to wiki documentation

More advanced capabilities available through config-driven sorting:

  • treat folders and files equally or distinctively, you decide
  • fine-grained folder-level or even notes-group-level specification
  • support for fully manual order
    • list notes and folders names explicitly in desired order
    • use prefixes or suffixes notation only for more flexibility
    • wildcard names matching supported
    • extract numbers and dates from titles and sort by them
  • group and sort notes and folders by notes custom metadata
  • support for automatic sorting by standard and non-standard rules
  • mixing manual and automatic ordering also supported
  • order by compound numbers in prefix, in suffix (e.g. date in suffix) or inbetween
  • Roman numbers support, also compound Roman numbers
  • grouping by prefix or suffix or prefix and suffix
    • different sorting rules per group even inside the same folder
  • simple to use yet versatile configuration options
  • configuration stored directly in your note(s) front matter
    • use a dedicated sorting-spec: key in note properties (aka metadata aka frontmatter aka YAML)
  • folders not set up for the custom order remain on the standard Obsidian sorting
  • support for imposing inheritance of order specifications with flexible exclusion and overriding logic

Basic scenario 1: set the custom sorting order for a specific folder

Create a new note named sortspec in the folder for which you want to configure the sorting

In the top of the new note put the following YAML front matter text:

---
sorting-spec: |
  order-desc: a-z
---

Click the ribbon button (Inactive or Static icon on phone) to tell the plugin to read the sorting specification and apply it. The sorting should be applied to the folder. On desktops and tablets the ribbon icon should turn (Active)

!!! Done! !!!

You should see the files and sub-folders in your folder sorted in reverse alphabetical order, folders and files intermixed

An illustrative image which shows the reverse alphabetical order applied to the root folder of some vault:

Basic example


Remarks

Remarks:

  • your new sortspec note should look like this except for the syntax highlighting, which could differ
  • you will notice that the folders and files are treated equally and thus intermixed
    • the behavior depends on what files and subfolders you have in your folder
  • changing the sorting order via the standard Obsidian UI button won't affect your folder, unless...
    • ...unless you deactivate the custom sorting via clicking the ribbon button to make it Inactive
  • for clarity: the underlying file name of the note sortspec is obviously sortspec.md
  • in case of troubles refer to the TL;DR section of advanced README.md
  • feel free to experiment! The plugin works in a non-destructive fashion, and it doesn't modify the content of your vault. It only changes the order in which the files and folders are displayed in File Explorer
  • indentation matters in YAML -> the two leading spaces in order-desc: a-z are intentional and required
  • this common example only touches the surface of the rich capabilities of this custom sorting plugin. For more details go to advanced version of README.md

Basic scenario 2: explicitly list folders and files in the order which you want

This comes from the suggestion by TheOneLight in this discussion

Take the instructions from the Basic scenario 1 above and replace the YAML content with:

---
sorting-spec: |
  My first folder name
  My second folder name
  My first file name
  My second file name
  // ... and continue so in the desired order
---

This will enforce the order as you listed inside the YAML


Editing multi-line properties in the new YAML properties editor (Obsidian 1.4 and newer)

The newly introduced YAML properties editor (Obsidian 1.4 and newer) can make editing the multi-line text properties tricky and confusing. There are short videos here How to create or edit a multi‐line property in Obsidian? which could be helpful:

  • how to edit the multi-line text properties in Obsidian properties editor (shift+enter does the magic here)
  • how to edit the multi-line text properties in Obsidian source view mode (the classic way, as you did prior to Obsidian 1.4)

Basic automatic sorting methods

The list of automatic sorting orders includes:

  • order-asc: a-z - alphabetical order, aka natural
    • 'a' goes before 'z' and numbers are treated specifically and 2 goes before 11
  • order-desc: a-z - reverse alphabetical order, aka reverse natural, aka descending alphabetical
    • 'z' goes before 'a' and numbers are treated specifically and 11 goes before 2
  • order-asc: true a-z - true alphabetical order
    • 'a' goes before 'z' and numbers are treated as texts and 11 goes before 2
  • order-desc: true a-z - true reverse alphabetical order, aka descending true alphabetical
    • 'z' goes before 'a' and numbers are treated as texts and 11 goes before 2
  • order-asc: created - by creation date
    • the oldest notes go first. Sub-folders pushed to the top, alphabetically
  • order-desc: created - by creation date, descending
    • the newest notes go first. Sub-folders pushed to the bottom, alphabetically
  • order-asc: advanced created - by creation date, also for folders
    • the oldest notes and sub-folders go first
    • for sub-folders the creation date of the oldest contained note is taken as folder's creation date
    • sub-folders not containing any notes are pushed to the top, alphabetically
  • order-desc: advanced created - by creation date, descending, also for folders
    • the newest notes and sub-folders go first
    • for sub-folders the creation date of the newest contained note is taken as folder's creation date
    • sub-folders not containing any notes are pushed to the bottom, alphabetically
  • order-asc: modified - by modification date
    • the most dusty notes go first. Sub-folders pushed to the top, alphabetically
  • order-desc: modified - by modification date, descending
    • the most recently modified notes go first. Sub-folders pushed to the bottom, alphabetically
  • order-asc: advanced modified - by modification date, also for folders
    • the most dusty notes and sub-folders go first
    • for sub-folders the modification date of the most dusty contained note is taken as folder's modification date
    • sub-folders not containing any notes are pushed to the top, alphabetically
  • order-desc: advanced modified - by modification date, descending, also for folders
    • the most recently modified notes and sub-folders go first
    • for sub-folders the modification date of the most recently modified contained note is taken as folder's modification date
    • sub-folders not containing any notes are pushed to the bottom, alphabetically

Remarks: In the above list the -asc stems from Ascending and -desc stems from Descending. The order-desc: and order-asc: can be replaced with more concise < and > variants, for example < a-z instead of order-asc: a-z

...and additional orders and modifiers:

  • standard, ui selected - apply whatever order is selected in Obsidian UI of File Explorer
  • by-bookmarks-order - reflect the order of selected group of items in Bookmarks
  • files-first or folders-first - self explaining
  • vsc-unicode or unicode-charcode - tricky for geeks
  • by-metadata: modifier to use specific metadata for sorting
  • using-extractor: in connection with by-metadata: to use only part of metadata value, for example a date in specified format
  • , separator to specify two levels of sorting. When combining folder-level and group-level sorting this allows for up to 4 sorting levels
  • advanced recursive modified or advanced recursive created - advanced variants of advanced modified and advanced created. Use with care on larger vaults because the deep scanning of folder descendants can have impact on performance on mobile devices

Patterns to extract numbers or dates from file and folder titles

  • \R+, \.R+ or \-R+ for Roman numbers
  • \d+, \.d+ or \-d+ for plain numbers or compound plain numbers
  • \a+ to extract the last word from title
  • \[yyyy-mm-dd], \[yyyy-dd-mm], \[dd-Mmm-yyyy], \[mm-dd-yyyy], \[dd-mm-yyyy], \[Mmm-dd-yyyy], \[yyyy-Www (mm-dd)], \[yyyy-Www] or \[yyyy-WwwISO] to extract dates in various formats

Sorting by note name and note name with file extension

If a folder contains files of various types, e.g. images and .md notes you can extend the sorting rules onto file name extensions and, for example, push JPG files before PNG. Use the a-z. or true a-z. syntax to enable that behavior for alphabetical or true alphabetical order.

Manual sorting

The manual ordering of notes and folders can have two meanings:

  • by drag & drop, and this is done via Bookmarks integration, enabled by default, or
  • by explicitly listing files and folders in the desired order. This is done via the sorting configuration. Refer to the TL;DR section of advanced README.md for examples and instructions

Ribbon icon

Click the ribbon icon to toggle the plugin between enabled and suspended states.

States of the ribbon icon on large-screen devices (desktops, laptops and tablets like iPad):

  • Inactive Custom sorting NOT applied. Plugin suspended or enabled, but the custom sorting was not (yet) applied.
  • Active Plugin active, custom sorting applied.
  • Error Syntax error in custom sorting configuration.
  • General Error Plugin suspended. Critical error like File Explorer view not available.
  • Static icon (Only on large-screen mobile devices like iPad). Plugin enabled. but the custom sorting was not applied.

On small-screen mobile devices (phones) the icon is static:

  • Static icon The icon acts as a button to toggle between enabled and disabled. Its appearance doesn't change

For more details on the icon states refer to Ribbon icon section of the advanced-README.md

Small screen mobile devices remarks

  • you might need to activate the custom sorting on your mobile separately, even if on a shared vault the custom sorting was activated on desktop
  • the Obsidian command palette being easily available (swipe down gesture on small-screen mobiles) allows for quick steering of the plugin via commands: sort-on and sort-off. This could be easier than navigating to and expanding the ribbon
  • the ribbon icon is static (Static icon) and doesn't reflect the state of custom sorting. You can enable the plugin state changes notifications in settings, for the mobile devices only

Installing the plugin

From the official Obsidian Community Plugins page

The plugin could and should be installed from the official Obsidian Community Plugins list at https://obsidian.md/plugins or directly in the Obsidian app itself. Search the plugin by its name 'CUSTOM FILE EXPLORER SORTING'

For other installation methods refer to Installing the plugin section of advanced-README.md

Credits

Thanks to Nothingislost for the monkey-patching ideas of File Explorer in obsidian-bartender

...and before you go, maybe you'd like the visual separators in File Explorer?

Do you want to have a nice-looking horizontal separators in File Explorer like this?

separators

If so, head on to Instruction and more context by @replete
Quick & easy!

This feature is not dependent on the Custom Sorting plugin. At the same time I'm mentioning it here because it is a side effect of a discussion with @replete. We were considering a direct support of the Separators in the plugin. Eventually this boiled down to a very concise and smart CSS-snippet based solution, independent of the plugin. Go, see, copy to the CSS-snippets in Obsidian and enjoy the more grouped look

Buy Me A Coffee

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Additional Icons
3 years ago by Matthew Turk
Add additional iconsets to Obsidian
AI Tagger Universe
a year ago by Hu Nie
An intelligent Obsidian plugin that leverages AI to automatically analyze note content and suggest relevant tags, supporting both local and cloud-based LLM services.
Alias Management
2 years ago by WithMarcel
Identify duplicate notes based on similar aliases and filenames in Obsidian.
Another Name
a year ago by Jiyuan Wang
Add a subheading to your note in Obsidian
April Automatic Timelines
2 months ago by april-gras
Simple timeline generator plugin for story tellers using obsidian
Attachment Management
3 years ago by trganda
Attachment Management of Obsidian
Attachment Manager
3 years ago by chenfeicqq
Attachment folder name binding note name, automatically rename, automatically delete, show/hide.
Auto Card Link
4 years ago by Nekoshita Yuki
Auto Folder Note Paste
a year ago by d7sd6u
Convert your note into folder note upon pasting or drag'n'dropping an attachment
Auto Tag
3 years ago by Control Alt
Easily generate relevant tags for your Obsidian notes.
Base Board
3 months ago by mderazon
Kanban Plugin For Obsidian
Bases Toolbox
24 days ago by Grub Basket
Adds Quality of Life features to Obsidian Bases
Better Export PDF
2 months ago by l1xnan
Obsidian PDF export enhancement plugin
Binary File Manager
5 years ago by qawatake
An Obsidian plugin to manage binary files
Boardgame Search
2 years ago by Marlon May
A plugin to create notes for boardgames based on the BGG API
Book Clipper
8 months ago by Hossein Fardmohammadi
Save book details from websites into your notes
Budget Planner
a month ago by kalinichenko88
A minimalist budget planning tool for Obsidian. Create, track, and manage budgets using markdown code blocks directly in your notes.
Bulk Exporter
3 years ago by symunona
Bulk export Markdown filtered, renamed and sorted by front matter metadata into a new structure.
Bulk Rename
4 years ago by Oleg Lustenko
Calendar Bases
5 months ago by Edrick Leong
Clone Vault
2 years ago by Sebastian Baroni
Clones the current Obsidian vault by copying settings and folder structure without note contents.
Conditional Properties
8 months ago by Diego Eis
Automate frontmatter property updates in your Obsidian notes using simple conditional rules.
Content Cards
a year ago by leo
Insert content cards in Markdown, such as timeline, highlightblock, target card, book information card, music information card, movie information card, photoes ablum, business card, content subfield, countdown, SWOT,BCG.
Copy Metadata
3 years ago by wenlzhang
An Obsidian plugin to copy metadata to clipboard and insert it into file name.
Current File Tags
2 years ago by Trung Tran
Daily Named Folder
5 years ago by Nemo Andrea
Like daily note, but nested in a daily folder and some more improvements
Daily Notes Automater
a year ago by David Pedrero
Dataview
6 years ago by Michael Brenan
A data index and query language over Markdown files, for https://obsidian.md/.
Dataview Autocompletion
2 years ago by Daniel Bauer
Discrete
a year ago by shkarlsson
Dragger
2 months ago by ariestar
An Obsidian plugin for dragging and rearranging any block.
Enhanced tables
2 years ago by pistacchio
A plugin for Obsidian to add advanced controls (like sorting and filtering) to standard markup tables
ExMemo Assistant
2 years ago by ExMemo AI
Using LLMs to manage files and generating metadata such as tags and summaries.
ExMemo Tools
2 years ago by Yan.Xie
Use large models for smart document management and optimization, including relocating files, enhancing text, and generating metadata.
Feed Bases
3 months ago by edrickleong
File Index
3 years ago by Steffo
Obsidian plugin to create a metadata file about the files present in the Vault
File Title Updater
a year ago by wenlzhang
An Obsidian plugin that synchronizes titles between filename, frontmatter, and first heading in your notes.
Flexplorer
2 months ago by kh4f
🗃️ Obsidian File Explorer Enhancer
Fold Properties By Default
2 years ago by Tommy Bergeron
Always have editor/metadata properties folded by default.
Folder by tags distributor
2 years ago by RevoTale
Automatically group Obsidian notes into folder by tags specified in note.
Folder Index
4 years ago by turulix
FolderFile Splitter
a year ago by Xu Quan
Frontmatter generator
3 years ago by Hananoshika Yomaru
A plugin for Obsidian that generates frontmatter for notes
Frontmatter Markdown Links
2 years ago by mnaoumov
Obsidian Plugin that adds support for markdown links in frontmatter
Frontmatter Metadata Link Classes
a year ago by Varvara Zmeeva / zmeeva.io
Enhanced internal links with automatic classnames based on frontmatter metadata.
Frontmatter to HTML Attributes
5 months ago by Tarek Saier
Gay Toolbar
25 days ago by chaskane
Colorful, customizable toolbar for Obsidian, designed for mobile.
GitHub Integration
a year ago by Kirill Zhuravlev
Plugin that fetch your github stars into notes
Graphic Organizer
5 months ago by Nick Le Guillou - Superhuman Curiosity
GridExplorer
a year ago by Devon22
Browse note files in a grid view.
Image Metadata
2 years ago by alexeiskachykhin
Adds image metadata editing capabilities to Obsidian
Kanban Bases View
5 months ago by I. Welch Canavan
A kanban-style drag-and-drop custom view for Obsidian Bases that allows you to organize your notes into columns based on any property.
Kanban Status Updater
a year ago by Ankit Kapur
Obsidian plugin that automatically updates the note property when card is moved to a column.
KoReader Highlight Importer
2 years ago by Tahsin Kocaman
Imports highlights and metadata from KoReader into Obsidian notes
Line Arrange
2 years ago by Chitwan Singh
Obsidian Plugin For Arranging Lines.
Linked Data Vocabularies
3 years ago by kometenstaub
Add linked data to the YAML of your Obsidian notes.
LLM Tagger
a year ago by David Jayatillake
Media Companion
2 years ago by Nick de Bruin
Media DB Plugin
4 years ago by Moritz Jung
A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.
Meta Bind Plugin
4 years ago by Moritz Jung
A plugin for Obsidian to make your notes interactive with inline input fields, metadata displays, and buttons.
Metadata Auto Classifier
2 years ago by Beomsu Koh
AI-powered Obsidian plugin that automatically classifies and generates metadata (tags, frontmatter) for your notes.
Metadata Extractor
5 years ago by kometenstaub
Obsidian Plugin that provides metadata export for use with third-party apps.
Metadata Icon
2 years ago by Benature
change metadata entry icon
Metadata Menu
4 years ago by mdelobelle
For data management enthusiasts : type and manage the metadata of your notes.
MetaEdit
5 years ago by Christian B. B. Houmann
MetaEdit for Obsidian
My Thesaurus
a year ago by Mara-Li
A plugin that auto tags file based on contents and a csv file or a Markdown table (inspired by https://github.com/pmartinolli/MyThesaurus)
NetClip
2 years ago by Elhary
this plugin is for Obsidian that allows you to browse the web and clip webpages directly into your vault.
Note aliases
4 years ago by Pulsovi
This plugin manages wikilinks aliases and save them on the aliases list of the linked note
Note Codes
a year ago by Ezhik
Reference your Obsidian notes from anywhere with simple 4-character codes.
Note Companion
3 months ago by nexus-jpf
Note Companion: AI assistant for Obsidian that goes beyond just a chat. (prev File Organizer 2000)
Note Favicon
a year ago by mdklab
Obsidian plugin – Show Favicon from Metadata
Note UID Generator
a year ago by Valentin Pelletier
Allow you to automatically generate UID for the notes in your vault.
Notes dater
3 years ago by Paul Treanor
Adds created_on and updated_on dates of the active note to status bar
Onto Tracker
2 years ago by Jacob Hart
Plugin for obsidian allowing project management with ontologies.
Papers
a year ago by William Liang
An obsidian plugin to retrieve and import research papers.
Paste Image Into Property
a year ago by Nito
Power Tables
18 days ago by Power Plugins
Color, calculate, and sort Markdown tables in place: cell fills and text colors, live formulas that recalculate, and column sorting, all stored as plain Markdown.
Pretty Properties
10 months ago by Anareaty
Project Browser
2 years ago by Dale de Silva
Property Panels
21 days ago by Eva Chen
Display and edit Obsidian frontmatter properties in configurable panels that stay inside the note's scrollable content.
Sentinel
2 years ago by Giorgos Sarigiannidis
A plugin for Obsidian that allows you to update properties or run commands based on document visibility changes.
Simple File Info
a year ago by Lukas Capkovic
Snipd Official
3 months ago by snipd-app
Sort and Permute lines
a month ago by Vinzent
Sort and Permute lines in whole file or selection.
Sort Frontmatter
3 years ago by Kanzi
Sort frontmatter automatically
Sortable Tables
a year ago by filippov112
A plugin for Obsidian that adds the ability to interactively sort Markdown tables in preview mode.
Supercharged Links
5 years ago by mdelobelle
obsidian plugin to add attributes and context menu options to internal links
Symbol linking
a year ago by Evan Bonsignori ; Mara-Li
Adds ability to link with any trigger in Obsidian. Each trigger can limit linking to specific folders or file.
Tier List
a year ago by Mox Alehin
Obsidian plugin for visual ranking and organizing content into customizable Tier Lists.
Todo sort
4 years ago by Ryan Gomba
A plugin for Obsidian that sorts todos within a note
Update Time
2 years ago by Sébastien Dubois
Obsidian plugin that updates front matter to include creation and last update times
Update time on edit
5 years ago by beaussan
Virus Total Enrichment
2 years ago by ytisf
An Obsidian plugin to enrich a note with VirusTotal API.
Watched-Metadata
2 years ago by Nail Ahmed
Watches for changes in metadata and updates the note content accordingly.
WebDAV Explorer
5 months ago by 蓝星晓夜
WebDAV Server Explorer.
Yori Task
3 months ago by yorigo77
task manager, week planner, year planner