Sort notes in individual folders rather than overall?

I was wondering if there was a way to make individual folders have their own sorting? Like I would love to have my daily notes and other date based ones be sorted backwards in order to show the newest up top and oldest on bottom, but have the rest of my folders sorted a-z like normal. Thanks in advance!

Maybe this plugin could help you :blush: : Custom File Explorer sorting
(I’ve never used it though :smile: )

1 Like

Hi @GarboDog
I’m the author of Custom File Explorer sorting mentioned by @Pch.
That plugin allows you to apply the described sorting logic in many different ways, based on your preferences.
Let me take the following interpretation and assumptions:

  • you will keep the sorting specification for multiple folders in a single place / single note, rather than separately inside each folder (both options are supported and a hybrid mixed approach as well)
  • you will explicitly indicate (list) the folders for which to apply date-based sorting. For this example assume two folders: Daily notes (at top level of the vault) and a folder Meeting minutes being a subfolder of Meetings root level folder.
  • the sentence show the newest up top and oldest on bottom refers to the note modification date and not the note creation date (both options are supported, anyways)
  • let the sorting of the rest of the folders be driven by Obsidian UI selection

Going with the above, you need to create a single note named sortspec anywhere in your vault (other options are possible, demonstrating here the simplest one)

In that sortspec note you should enter the following sorting specification. It should go to the head of the note, technically speaking into YAML front matter of the note. In Obsidian terms - you need to create a property named sorting-spec.

Textual format as follows (you can view it in ‘Source mode’ of the Obsidian note editor).

sorting-spec: |
  target-folder: Daily notes
  target-folder: Meetings/Meeting minutes
  order-desc: modified  

Remark: space indentation matters, this is imposed by YAML syntax (aka Obsidian properties syntax)

Obviously, you need to install and enable the plugin, then activate the custom sorting by:

  • clicking the ribbon button, or
  • issuing the command (from commands palette): sort on, or
  • using the context menu on any folder or note and choose Custom sort: --> Apply custom sorting.
1 Like

Thank you so much! I am noticing that when I do custom sort: → Apply custom sorting, its not organizing what’s inside the folder but rather the folder in the library.

After fiddling with it, I figured out was to select all the notes inside the folder and select Custom sort → Book mark it+siblings for sorting. However when I do this: when I want to add more notes into it, I have to unbook mark all the notes, add the new note in and re bookmark all the notes. Even still the very last note at the bottom wont get sorted. Is it possible that I didn’t do it right?

In specifics:

  • folder I need notes inside sorted z-a: Dream Dump.
  • I made a note in said folder: sortspec
    -In the sortspec note, it says:
'''sorting-spec:
  target-folder: Dream Dump
  order-desc: File name (Z to A)
'''

(replacing the ` with ’ because idk how to put it in properly lol)
either way I have the sortspec note in there for now at the bottom and this is working good :>
Thank you so much for pointing us in the right direction @Pch and @SebastianMC for further helping =w=;

OH! disregard my last message, I got it!! This is amazing and works great! I’m just dumb bad at these kind of things haha

image

This is amazing!! Thank you for making this! :smiley:
:mushroom: