Properties: Sort Properties in-file (quality of life feature)

Use case or problem

It is possible to sort properties by name (A to Z or Z to A) in the sidebar, but many people interact primarily with Properties in the file rather than in the sidebar.

Having the option to sort Properties in the file at the click of a button would be a great quality of life feature for those of us who appreciate alphabetization for the satisfaction of consistent organization across files and the feeling of mental de-cluttering.

Proposed solution

  • Add a command to sort Properties alphabetically, AND/OR
  • Add a command to sort the selected text alphabetically

Current workaround (optional)

The most effective existing solution is a plug-in called Sort & Permute Lines. It still works, but it hasn’t been updated in three years. Another disadvantage is it requires switching into Source Mode, selecting the text, and executing the command which is less efficient than having a single command to sort Properties. Major downside of this plugin is that if there are already values present in each Property field, those values are sorted into the wrong Properties, so this isn’t really a solution

Another workaround is simply to activate the “Unique note creator” core plugin and select a template containing Properties in the correct order. This would work well if every file had the same set of Properties, but that’s not the case for many users.

Not a solution to your problem, but there’s also plugin called “Linter”, which among many other features, offers also properties sorting (including sorting by a specific order in which you want to have your props). It is actively maintained

Would be nice to have this built-in tho.

1 Like

Thanks I was not aware that Linter did this!

But I agree, baked-in would be nice.

1 Like