Skip to content

Any way to sort globally but keep folders on top? #201

Answered by SebastianMC
toddz262 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @toddz262

to accomplish what you describe use the below sorting specification:

---
sorting-spec: |
  target-folder: /*
  > a-z by-metadata: date created
  /folders
  /:files
---

The specification if pretty self-explanatory:

  • target-folder: /* tells to apply the sorting which follows to all folders in the vault, including the root folder
  • > a-z by-metadata: date created sets the default order (inherited by all folders unless specified otherwise) by date created metadata field, newest items on top (aka descending order by date)
  • /folders groups (sub)folders first and puts them in the top of the sorted folder
  • /:files puts files below folders (this line kept for clarity and can be omitted - …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@toddz262
Comment options

Answer selected by toddz262
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants