File Explorer Custom Sort

+1
Finally decided to move from OneNote to Obsidian, but now I notice that we can’t organize notes within a folder, or organize folders. This is an absolute deal breaker for me.

So what I’m doing right now is:

  • Write/edit .md files in VSCode (comes with a good md preview pane).
  • Store all files in a single local (or cloud) folder.
  • Link each .md file to it’s own note on OneNote.
  • Organize notes on OneNote according to your personal mental model.

I really hope Obsidian develops this feature, but after a year and half of users asking for this feature, it seems this is not a priority for Product Managers.

2 Likes

+1 Please add this feature.

1 Like

It will be a great and necessary feature.
At the moment I simply name my files adding a number before the text, like:

  1. First Note
  2. Second Note
1 Like

Coming from onenote and scrivener, I discovered that Obsidian offers no ‘free’ sorting. That feature is really necessary to turn Obsidian into a writing app that allows you to move notes around as for example in Scrivener. I tried outliner, longform and MOCs but none of them allows me to sort my ideas as I want to. I hope the feature appears soon for it would really make Obsidian a second brain (in our first brains we are also able to move ideas around).

1 Like

In OneNote and Scrivener, you work within one file.
If you work within one markdown file, you can move headers and sections around as you want.

In case this helps anyone, I figured the next best thing to having custom sort would be to make a MOC system (basically a table of contents) that lists out my notes in the way I want them organized.

I explain the process here: Feedback wanted for Automatic MOC plugin I wrote (wondering if there's a better way)

+1, this would be really useful.

1 Like

+1 yes please. Important feature. Thank you, devs.

1 Like

+1
For what it’s worth, this is one of the few things I find missing from my experience in Obsidian. It would be a delight to be able to freely sort the files in the tree.
I made an account just to post a +1 for this request.

1 Like

+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