Atharva Dhamankar364 downloadsA tag folder based explorer for obsidian. Uses the nested tags feature of obsidian to create virtual folders, allowing individual files to exist in multiple locations, inside a single vault.
A tag folder-based explorer for Obsidian. It uses the nested tags feature of Obsidian to create virtual folders, allowing individual files to exist in multiple locations inside a single vault.
Obsidian is a great note taking software, but its default tag explorer can feel restrictive. While traditional file explorers exist at the OS level, they technically lock each file into a single directory.
Generally, when I create new files, I tend to dump them all into a single folder (like "Downloads"). The benefit is that everything is sorted chronologically, but it's a mess. On the other hand, strictly sorting project specific files into deeply nested folders often leads to them becoming "out of sight, out of mind" and you end up forgetting those files even exist.
This project strikes a balance between both approaches. It provides a virtual, nested tag-based view so that each file can logically exist in multiple paths simultaneously. At the same time, the classic Obsidian sidebar can still provide you a chronological, flat view.
https://github.com/user-attachments/assets/56658ef6-98c4-4291-ac19-80c72fd3a66b
Virtual Folders Representation: Leverages Obsidian's nested tags (e.g., #fruit/orange, #fruit/apple) to create a familiar folder-like tree structure. (In the example, the parent folder is fruit which has two children folders orange and apple).
Multi-location Files: By adding multiple nested tags to a single file, the file will identically appear in multiple "virtual" folders at the same time.
Sortable Tree Sidebar: The left sidebar provides a nested view of your tags, allowing quick navigation and a bird's-eye view of your vault. Files are automatically organized based on their metadata tags. Untagged files are gathered under a separate "Untagged Files" folder.
Folder Descriptions: Each virtual folder has an associated metadata file where you can manually document its context and purpose. This allows a folder to have an explanation for its existence and exact purpose.
File/Folder Legends (Color Coding): In cases where you don't want to create subfolders for minor segregation, but still want to separate files and folders, within a parent, you can assign one of 6 legend colors to any file or folder. The meaning of these labels can be defined inside the parent folder's properties (e.g., "Red tags in the Math folder mean there's an upcoming deadline").
Pinned Files and Folders: Pinning files and folders allows you to keep your most important items easily accessible at the top of the parent folder.
Intuitive GUI: A familiar graphical user interface allows users to create, rename, and delete files and virtual Tag Folder visually. Thus, the user doesnt need to manually type the exact tag into the file's frontmatter, which can lead to accidental typos.
Drag & Drop: Having a seamless drag and drop functionality allows the user to drag and drop files and folders between the tree sidebar and the main view to move them. Hold Ctrl (or Cmd on Mac) while dragging to assign the new tag while keeping the old one, making the file exist in both locations.
Easy Navigation: By clicking on tag folders users can open them in the current view, or hold Ctrl to open them in a new background tab.
Data Portability: Staying true to the philosophy of Obsidian, all the plugin's data is stored natively inside file's YAML metadata. This means your data is never locked behind the plugin's internal database. Every virtual folder has an associated .json file stored in the .TagNodeMeta folder at the root of your vault.
Obsidian naturally implements a feature called nested tags to organize and allow granular branching of tags. For example, two tags named "orange" and "apple" can be grouped under the same parent tag as #fruit/orange and #fruit/apple.
This is a great concept from the perspective of organization, but Obsidian's default tag explorer view is quite basic and doesnt build on the potential of this feature.
By utilizing nested tags as virtual folder paths, we can map multiple paths to a single file, allowing a single file to exist in multiple virtual folders. Since Obsidian doesn't natively feature a file explorer that utilizes this multi-path capability, this plugin bridges the gap. It creates a nested tag based file explorer, which attempts to maximize the utility of nested tags.
Since the application has multiple moving parts, the initial priority while building this project, was correctness and feature completeness which later was followed by systematic performance tuning across the codebase .
Below are the optimizations which were implemented, what was improved, and their impact.
Problem:
Unlike standard TagNode instances, which stored children in a map/record for O(1) lookup, the root node was implemented as a lightweight proxy and did not maintain the same structure. As a result, child lookups at the root level were falling back to O(n) traversal.
Improvement:
The root node was upgraded to use a proper keyed record structure for its children, aligning it with the rest of the tree implementation.
Result:
Problem:
File retrieval within a TagNode was implemented using an O(n) search, iterating through file lists to locate matches.
Improvement:
Instead of performing repeated linear searches, the existing global file map was leveraged. File identity validation was then done using direct reference comparison, which is an O(1) operation.
Result:
Problem:
The process for extracting tags from the body and syncing them into frontmatter suffered from multiple inefficiencies:
Improvement:
SetResult:
⚠️ Warning This plugin is currently under development. If you want to test it out, make sure to keep a backup copy of your vault. Although the chance of the plugin corrupting your files is incredibly low, it is never absolutely zero.
You can either clone/download the repository manually or download the latest pre-built files from the Releases page.
main.js, styles.css, and manifest.json under Assets..obsidian/plugins/ folder.tag-folder-explorer inside .obsidian/plugins/.tag-folder-explorer directory you created..obsidian/plugins/ folder (create it if it doesn't exist).tag-folder-explorer inside .obsidian/plugins/.dist/ folder from the downloaded zip/repo.main.js, styles.css, and manifest.json from it.tag-folder-explorer directory you created.If you'd like to build the plugin locally:
<Vault>/.obsidian/plugins/tag-folder-explorer/). Obsidian will automatically pick up the output main.js from the root directory.npm install to install dependencies.npm run dev to start compilation in watch mode (or npm run build to create a production build).MIT License. See LICENSE for more details.