"Nested vault" / vault scoping plugin

From poking around, I see a lot of discussion about nested vaults (or other ideas to solve the fundamental problem). It seems clear to me that literally nesting multiple instances of Obsidian vaults is not ideal — you really want Obsidian to know about the whole vault, else things are bound to be fragile (differing settings, renames, etc.) And even when you’re scoped to a sub-vault, you may want to be able to follow or create links out of it.

I guess the first question is, are there plans to address this with a first class feature?

If not, does anyone with experience developing plugins know if the plugin API is sufficient to support something like this? For some minimal functionality, I think you’d want:

  • Right click on a folder to mark it as the current scope.
  • Some UI to clear the scope.
  • When scoped to a folder:
    • Opening or auto-suggesting links get filtered to notes in the current folder.
    • When showing suggestions: some button to “show all” in case you want to break out of the scope.
    • New notes get created inside the scoped folder instead of the top level folder.
    • Filter the graph to the scope.

Of course there’s way more you could do with the idea of scoping (as some of my links above describe very well.) But if I could just have that minimal functionality it would be enough that I could happily live in one vault instead of awkwardly living over several.

I haven’t explored the plugin architecture much, but I’m an experienced web dev and would be totally down for developing this if it is possible. Thoughts?

14 Likes

I don’t know, but given all the things I’ve seen plugins do, I’d guess it’s doable.

I would love for this plugin to exist.

1 Like

I also wrote about this here: Context Overwhelm, Concentric Vaults, and Sensemaking - Thinking On Thinking In Notes

I still think functionality along the lines you suggest is necessary. For me, at least. I have been poking at a potential solution using plugins, but I haven’t had the time to get it working. I’ve managed to duct tape a system together with scripts that copy or sync vault stuff around, but it’s fragile and takes too much setup.

I definitely support this idea getting some deeper thought.

Partial workaround: The File Tree Alternative plugin lets one “focus in and out to a certain folder, which will help you to save space in the folder pane”. Just taming the file explorer like that feels so good — it’s probably the top thing I want from scoping. Unfortunately I’m not using it because the plugin is buggy (broken ribbon button on mobile; visual bugs on desktop & mobile if I remember right).

(Apologies to @ozan for not writing up proper bug reports yet.)

1 Like

Also the in-development Bartender plugin features file browser filtering (among other abilities).

Maybe this could be done with a version of folder notes that hides all files and folders that are in the associated folder, unless there is already link to them in the folder note. If a folder note is accessible to search, then all the notes it lists are also accessible. This is true recursively if a folder note list includes the folder notes of any sub-folders.

Thus folder notes could be used as a menu system for browsing the vault. From a folder note you can discern and perhaps navigate:

  1. Which notes in the folder are public
  2. Which other folder notes they reference, and which notes reference them
  3. Which private notes they reference
  4. Which notes in the folder are orphans.

As for the link completion, we can modify how the built-in completion works by monkey-patching it.

Here’s an example from my tiny plugin that renders equations in link completion.

Here I modified renderSuggestion, but in your case, you will need to patch ‘getSuggestions’ instead.

By the way, I have another plugin idea to make it easier to work with nested vault, rather than creating “scopes” inside a single vault, for example:

  • When a file belonging a sub-vault is opened, it will be opened in the sub-vault instead of the main (parent) vault.