File Explorer Custom Sort

+1
I also need this.

1 Like

It would be great if that feature can be adjusted for different purpose. In my mind comes for example docusaurus which was used for the great getting started tutorial for plugins at Obsidian Plugin Developer Docs | Obsidian Plugin Developer Docs (marcus.se.net)

It uses yaml frontmatter for markdown files:

sidebar_position: 1.0

The cool thing here is the type is a float. So if i want to insert between 1 and 2 i can write 1.5, which makes less commit changes if my vault is under git control.

For directory it uses a _category_.json in each directory:

{
  "label": "Advanced guides",
  "position": 40
}

I canā€™t believe my luck but Custom Sort has officially been achieved.
Obsidian Bartender, a wonderful plugin that I already use for custom sorting of icons in the sidebar, has added Custom sorting to the file browser.

Example:
customsort


In order to install Obsidian Bartender, either manually install the plugin or use BRAT and search for nothingislist/obsidian-bartender.

Once youā€™ve installed it, click the official Sort button in the file browser and hit ā€œCustomā€ at the bottom.

image

My Obsidian wishlist is nearly complete.
Thank you @NothingIsLost!

18 Likes

Wow, thanks for mentioning this @B-C and thank you so, so much @NothingIsLost, this is fantastic!

I did notice that dragging things around folders doesnā€™t work perfectly, presumably because Obsidian thinks youā€™re trying to drag the item into the folders and not between them, probably a difficult issue to resolve. I found it much easier to open data.json and rearrange them manually there before re-opening the vault.

3 Likes

Yeah, dragging items in-between folders isnā€™t possible currently. I freeze folders in place while dragging because if I donā€™t, you wouldnā€™t be able to place items into a folderā€¦ the folder would keep slipping out from underneath your cursor :slight_smile: Iā€™m still considering options for improving that and open to any ideas.

3 Likes

Maybe a separate edit modal that brings up a list of items that you can drag up and down completely separate from the file explorer and itā€™s associated functionality? Itā€™s probably a lot more work but I canā€™t think of any more elegant solution.

It would also be nice to be able to retain custom sorting but not make it editable, itā€™s easy to mess up, especially on mobile.

1 Like

Thanks for the input. Iā€™m thinking of adding an icon in the file explorer header bar that lets you toggle the ability to ā€œdrag to rearrangeā€. This will solve my ā€œcanā€™t drop items into foldersā€ problem and your ā€œitā€™s easy to accidentally rearrange stuffā€ problem.

6 Likes

The new drag functionality can now be tested in the latest release https://github.com/nothingislost/obsidian-bartender/releases/tag/0.5.0

It also adds file explorer filtering: https://cdn.discordapp.com/attachments/931552763467411487/939943412147306596/Obsidian_fLiLiVToEc.mp4

13 Likes

This is absolutely fantastic, itā€™s a lot easier to work with this way! Thank you for the amazing plugin, youā€™ve made a really big difference to my workflow!

Oh wow, you even added regex support to the filtering, nice!

Thank you for this, canā€™t wait for full release. Amazing work, this helps a lot.

+1 that custom sorts on the folder should be a core plugin. this would make a big difference to file management.

4 Likes

This is THE Crucial Plugin for me.
Because I create Note headings first and keep filling them as and when I get time/discover more information. Hence my notes are often not in order of priority , rather then at the time I learnt/discovered them.

I signed up just to give this a +1. Iā€™ve switched over to Obsidian a couple of weeks ago and have been loving it so far! Having the ability to order my notes freely is the only missing thing for me. I hope the development team puts this high up in their priority list.

1 Like

@NothingIsLost ~

Thank you so much for creating this plugin! The features look absolutely GREAT! And, the video you provided is very helpful. :slight_smile:

However, Iā€™ve run into what is probably a newbie issue:

  • After installing the BRAT plugin and the Bartender plugin, and then closing and reopening Obsidian, the header bar for controlling this plugin is still not visible in my file explorer.
  • Q: Is there a display or preference setting I need to adjust to make the plugin controls visible?

Thanks in advance for your help.

1 Like

I didnā€™t need to adjust any settings to have it displayed, have you tried going back to the default theme to see if itā€™s available there?

Any chance you might consider adding a way to hide a folder from the File Explorer? Iā€™m guessing I can find the selector and display: none but it seems like a feature that would be well aligned with Obsidian Bartender.

Thanks for the suggestion, @ChristinWhite. Iā€™m already using the default theme, so apparently something else is causing the issue with the missing header bar . . . .

image

This is what mine looks like, I am using dark theme by kepano.

This plug-in is undeniably the one of ā€œtheā€ best plugins I have ever used on Obsidian.

1 Like

The only thing i can think of is that you may be delaying the load of the plugin. Are you using any of the delayed plugin load techniques like what TFTHacker posted last month? If so, youā€™d need to exclude bartender from being delayed.

If thatā€™s not the case, you may want to try disabling all plugins, except for bartender, and then restarting the app. If thatā€™s still not fixing things, Iā€™m at a bit of a loss.

@NothingIsLost ~ Thanks so much for your feedback! Iā€™m not aware of the TFTHacker post to which you are referring, but Iā€™ll see if I can find it.

At this point, I have no idea if any of my installed plugins include a ā€œdelayed loadā€ feature, but Iā€™ll be glad to test my installed plugins one-at-time to see if I can get to the root of the issue.

In the meantime, can you confirm that this plugin does (or does not) work with Obsidianā€™s new Live Preview editor?