Same sort order for folder and files

+1 would also love this

+1 for this feature. I want Obsidian to stop forcing a non-user friendly way of sorting content. This should be a setting, not left to a community plugin.

3 Likes

+1, would really appreciate this feature.

+1. Iā€™m resorting to Sebastians plugin, but really think it orta be built in. Thank you for reading.

+1 This sorting option seems an obvious omission. My workflow is cumbersome without it.

Thanks for this! Some sanity is restored to my world.

+1 for having alphabetical ordering instead of folders first ordering as a feature of Obsidian.

For the record: I installed the custom-sort plugin and uninstalled two minutes later because it would take longer to wrap my head around how it works. Itā€™s honestly impressive and certainly useful to many, just overkill for my simple needs.

1 Like

Have u tried GitHub - ozntel/file-tree-alternative: This Obsidian Plugin allows users to have a different file explorer experience. ?

Yes, the developer is improving it and fixing some of the bugs, but itā€™s still too buggy to be used every day.

+1 Hate that I have to kludge putting everything under a folder or nothing under a folder just to get sorting. Amazed this still isnā€™t an option to unify folders and notes for sorting.

@SebastianMC how exactly to use this? I can see that the sortspec applies to a given folder only. How do I configure the plugin to treat folder and files equally?

Got the solution, need to add this to sortspec (keep it anywhere in root or any other folder):

---
sorting-spec: |-
  target-folder: /*
  order-asc: a-z
---

Applies the setting globally to all files and folder.

2 Likes

Hi @sanjarcode

indeed, you correctly figured out the basic usage pattern!

Technically, the sorting-spec: applies to the specified target-folder: - a single specified target folder, a list of target folders (repeat target-folder:), pattern-based matching for folder names/paths, etc. You should be able to conveniently fine-tune the affected folders. At the same time, skipping the target-folder: at all by default applies the sorting to the parent folder of the note containing the spec.

Then, the sorting-spec: itself can be placed in metadata (aka properties) of note(s) named sortspec. Additionally, you can use the ā€˜folder notesā€™ (notes inside a folder named exactly as its parent folder). It is an equivalent location. You can also keep the sorting-spec: in metadata (aka properties) of any note(s) you like - you need only to enter the note name(s) in plugin settings.

My only way around this currently is always to use folder notes.

+1. Iā€™d like to have this option on a per-folder basisā€”I have use cases for both sorting methods.

Related: