Symbolic links [symlinks, folder links]

Thanks for this tool !

My notes folders often contain some symbolic links to markdown files located elsewhere, bringing them into the note space. I’d like it if these appeared in the files pane and could be edited normally.

15 Likes

Second this. I’m using an app (iaWriter) on the phone to make notes while I’m away from the desktop. The app creates new notes in a specific cloud dir, which, irritatingly, cannot be changed. As a workaround, on my desktop if I make a symlink from this folder to my Obsidian “inbox” dir it appears in Obsidian desktop and I can see any new items in there. So that’s great.

However, if I restart Obsidian, the linked folder no longer appears in the sidebar.

I’d like to see a feature where symlinked dirs are supported.

This is on macOS btw.

Would love to see this, as I would definitely use this as well.

Came to bump this, definitely required.

Just tried to use symbolic links to sync a specific folder from my vault to another vault on a different computer using Google Drive as the intermediary.

Procedure:

  • User 1:

    • create new Google Drive folder and share with User 2
    • sync Google Drive folder to local computer
    • create symlink mklink /J C:\<Your Vault>\<Folder to sync>" "C:\<Google Drive>\<Folder>"
    • watch <Folder to sync> appear in the Obsidian File Explorer
  • User 2:

All good?

Sadly, no. When User 1 creates a note in <Folder to sync>, the folder disappears from User 2’s Obsidian file explorer :grimacing:

Would love to see a fix for that!


(potential workaround is to delete and recreate the symlink but that seems a bit tedious for every note edit between User 1 & User 2)

1 Like

Use case or problem

  1. Having to use a css folder for each vault
  2. To keep different types of notes separated one has to use different vaults.

Proposed solution

For #1 Symlinks allows to use just 1 css folder for all vaults
For #2 one can symlink certain files or folders from 1 vault to another.

Current workaround (optional)

Related feature requests (optional)

Hey y’all. I wrote a plugin that hot fixes this. Tested on Mac OS and Windows.

Wow !! Fantastic, it works, yay !!!

Chris, this is awesome, many thanks. I have 2 constructive remarks:

  • it is not yet in the 3rd party section of the Obsidian settings, at least I have not found it
  • it might be worth mentioning that if one installs the plug-in manually, as I have, it needs to be put in the folder containing the symlink and not in the folder with the original CSS file.

You should mention this in the Discord channel too !!

1 Like

@chrisdmacrae: let’s say I have vault1 with a folder .obsidian and a subfolder themes and in there theme1.css.

In vault2 I have the same subfolders, but only with a symlink to theme1.css. That works fine.

In both .obsidian folders in both vaults I also have a snippets subfolder, with in snippets1 a couple of .css files. When I create symlinks from snippets2 to the files in snippets1 they have no effect in vault2. And in the settings in vault2 they do not even show up for toggling.

Is this a bug, or is that normal? I know symlinks are not files, so don’t show up in the settings, not even the symlink to the theme does. But the latter is used in vault2, whereas the snippets are not.

Another thing I have noticed is that when I make a symlink of an .md file from one vault to vault, it does not show up in the .md file list of that hosting folder, even though I have also installed your plug-in in the latter.

What do you think about these 2 issues?

BTW, your plug-in is still not listed in the 3rd party plug-ins in the Obsidian settings.

1 Like

one use case: Floating \ Pop-out \ Multiple windows of the same vault
(with some discussion about the links spread across the thread.)
keywords: soft link

@chrisdmacrae: unfortunately it does not work with version 0.10.1. I sent you a DM, and have raised issues here, but you seem to have disappeared. A pity.

2 Likes

Here’s another plugin for using symlinks to folders outside a vault:

It has only been tested on Windows at the moment, so I’d appreciate feedback from OS X and Linux users.

Note that this plugin only supports symlinks for vault contents outside the .obsidian folder, so you can’t use it for things like a shared CSS folder. (At least not yet.) It also only supports symlinks to directories, not individual files.

The difference between this plugin and the one made by @chrisdmacrae is that it does not constantly scan your vault for symlinks, nor does it rename them to trick Obsidian into rescanning their contents. Instead, it patches Obsidian’s FileSystemAdapter to recognize symlinked directories as directories, and to add additional watches for those directories (so that changes made outside of Obsidian will be detected automatically, just like for non-symlinked folders).

will be implemented in 0.11.1

https://help.obsidian.md/Advanced+topics/How+Obsidian+stores+data#Symbolic+Links

1 Like

Thanks for this! Happy to see this!