Keep-sorted: lists and tables that stay sorted on their own

Disclaimer

Is this plugin open source? Yes
Is this plugin completely free? Yes
Is this plugin vibe-coded beyond the author’s ability to comprehend how it works? No
Community Directory: Keep Sorted


I have a lot of notes that are basically lists: plants in the yard, vendors, glossaries. I got tired of putting new items in the right place by hand, so I wrote a plugin that does it.

Wrap a list in markers:

%% keep-sorted start %%
- Dog
- Cat
- Bird
%% keep-sorted end %%

and it stays sorted. Sorting happens after the note has gone five seconds without changes, so lines don’t jump around while you type.

A few details:

  • It sorts by the text you see, ignoring list markers, link syntax and formatting, so [[file|Display]] sorts as “Display.”
  • Multi-line items (indented continuation lines) move as a unit.
  • Tables work too; the header rows stay on top.
  • Options on the start marker: order=desc, case=no, numeric=yes (so 2 comes before 10), and skip_lines to pin lines at the top or bottom.
  • Commands: mark the current selection, or re-sort every block in the vault.

The markers and options come from Google’s keep-sorted tool for code, so if you already use that, the syntax will be familiar.

Install it from Community plugins (search “Keep Sorted”). Source and issues: GitHub - rtm/obsidian-keep-sorted: An Obsidian plug-in to keep lines in a code block sorted · GitHub

Feedback and bug reports welcome.