SebastianMC / obsidian-custom-sort

Take full control over the order and sorting of folders and notes in File Explorer in Obsidian
GNU General Public License v3.0
255 stars 19 forks source link

Feature Request: Add option to pin folder notes #79

Closed maiixu closed 1 year ago

maiixu commented 1 year ago

I have a folder note for each of my projects under each project directory. It would be nice if, instead of specifying target folder for each project, there's an option for pinning folder note, or even better, a variable such as {%foldername%} for sorting spec.

For example,

---
target-folder: /*
... GTD
{%foldername%}
---

would put foldernotes after all notes that ends with GTD.

SebastianMC commented 1 year ago

Hi @maizehsu,

Implementation completed and available in recent release (1.8.1) of the plugin

The final syntax is {:%parent-folder-name%:}, it fits seamlessly with already supported grammar and cannot be confused with a name of a real note (the : character is forbidden in folder and file names)

The example sorting spec reflecting your idea looks like:

---
sorting-spec: |
  target-folder: /*
  ... GTD
  {:%parent-folder-name%:}
---