Closed zverhope closed 10 months ago
Sorry, not sure I follow—where is the order mismatch? The first-party file explorer?
Yes, that's it precisely - I essentially use the Scenes tab as an outliner that allows me to represent the order and hierarchy of the parts of a project. But I typically work from the first-party file explorer while writing, as my project contains notes and other files that are excluded from the eventual compile and therefore not present in the Scenes tab. Working from the explorer doesn't allow me to see the order of the scenes, which is important to my sense of where I am in the project.
I use the file explorer sorting plugin to organize my folders and their content, so a possible solution could leverage that plugin as a dependency to specify that indexed files appear first and in the order you've given them in the Scenes tab. Even better would be to have an option that would also privilege and represent the order of your indexed files in Finder or an external editor. My possibly naive thought was that this could be done by optionally prepending scene numbers to the name of the file.
I have no control over the file explorer, unfortunately. I don't want to rely on other third-party plugins, and don't want to risk deep integration with the first-party explorer when it's closed source and has no API hooks for file ordering. Your best bet would be to file a feature request with obsidian to ask for file sorting API--then I could safely integrate.
Happy to leave this open as a placeholder if they do add such API.
What if longform dynamically renamed the names of the scene files to be prefixed with the index? Would that be possible?
It's theoretically possible, yes, but could get a little spooky depending on what you're using for sync. But it's a fun idea, I'll ponder it a bit.
If added, probably better as opt-in :)
Might be worth taking a look at this plugin: https://github.com/SebastianMC/obsidian-custom-sort
I had this request too, until I resigned to:
1.0
, 1.1.0
, 1.1.1
, 1.1.2
, 1.1.3
, etc.
so all File Explorers (eg. Obsidian, VS Code, OS) order scenes correctlyI've thought about this more and am going to close it. I don't want Longform to both run its own pane and muck about in the explorer pane—it just feels like the plugin would be exceeding its bounds.
Describe the solution you'd like
I'd like the order of the notes in my longform project to mirror the order represented by the "Scenes" tab of the longform view/window. The optimal solution would be to rename the notes themselves to reflect the numbers the user can elect to enable before the note names. The other solution would be to optionally add
sorting-spec
metadata to the index for users of the Custom File Explorer sorting plugin. This metadata would simply mirror thescenes
- the same scenes in the same order - but without the leading dashes to represent the outline structure. I prefer the first option insofar as it would duplicate this structure, but know it might be the more difficult way to implement this.I don't know whether mine would be a widespread use case. I'd simply like to see the order of the scenes reflected in the file explorer, while also (in the case of changing file names) having that order available to me in an external editor. If there's any enthusiasm for this, and it's easy to implement, then great. If not, then I'm happy to fork and do the work myself. Unfortunately, I'm new to Obsidian and don't have much JS/TS/React in my limited coding repertoire. I attempted to do this already with the little skill I have in this area - basically just an understanding of the grammar of these languages more generally - but the
main.js
file is too big for me to legibly parse at this stage. Any pointers as to where I'd go, or what existing variables I'd leverage to accomplish either option, would be very appreciated.Thanks so much for this incredible tool!