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] Hiding files/Folders #61

Closed replete closed 1 year ago

replete commented 1 year ago

I'm not sure if this fits this plugin or not.

I have a pesky Context folder that is being generated by something, maybe DB Folder and I thought this plugin would probably have a hide feature. It doesn't appear to, so here's a suggestion!

This plugin has such a great approach to tweaking the file explorer view, which is at this point our main vault navigation so perhaps it might be a nice feature addition.

Off the top of my head, an entry in sortspec like !Foldername would just hide it.

Thanks again for a great plugin.

Phil

SebastianMC commented 1 year ago

Hiding files or folders is supported by the plugin from the very beginning as an advanced and experimental feature, not documented.

At this point I think that documenting it in a section like experimental features wouldn't hurt, I will do it.

There are some unobvious (and potentially confusing) ramifications of hiding a folder or file using this plugin:

Ok, being warned, here go the instructions if you want to hide a folder or a file

Examples:

---
sorting-spec: |
  target-folder: /
  /--hide: Development
  /--hide: sortspec.md
---

The above example hides a folder Development and a file sortspec.md in the root folder of the Vault Implicitly, the sorting order of root folder goes under the control of custom sorting plugin and changing the UI sorting selection has no effect on root folder entries

---
sorting-spec: |
  target-folder: Development
  /--hide: C
  /--hide: sortspec.md
---

The above example hides a folder Development/C and a file Development/sortspec.md Implicitly, the sorting order of the Development folder goes under the control of custom sorting plugin and changing the UI sorting selection has no effect on root folder entries

replete commented 1 year ago

Quality stuff, Sebastian!

Thanks for yet another comprehensive solution.