Shortcuts in file view

Use case

I want to be able to easily access the same file or sub-folder in multiple folders for the sake of organization and convenience. For example, If I have a folder named fruit, and it contains the sub-folders named apple, orange, and banana; but I also want each sub-folder to have a copy of the “how to make a fruit salad” file; I can only do that if I have either a shortcut to a root file

Proposed solution

The same feature exists on most system explorer applications for operating systems, you can create a shortcut in a folder that is an alias to the original file or folder; it would function identically.

Proposed implementations

A quick and dirty way to do this for files (but not folders, not without the “Folder notes” plugin at least), would be to create a page with a link to the file, that is automatically executed.

A more complex execution would be to make the location of the files not directly correspond to their entries in the file view, but are instead aliases which can be copied across multiple parts of the folder structure. that second implementation would make it incompatible with traditional folder structures, or at least make it harder to navigate the files in the system explorer.

The best implementation would probably be to include a “create shortcut” option to the right click menu when hovering over a folder or file (or other shortcut), which creates a shortcut file with with a name that is synced with the copied entity and an icon indicating that it is a shortcut (like this one: :leftwards_arrow_with_hook:). If the file the shortcut the file is in, has another file or folder with the same name; bring up a warning message to rename at least one of the conflicting entities. If a shortcut can be named separately from its host file: then the shortcut name is synced to an entry of the alias metadata of a file; so any attempted links to the shortcut file using wiki links, or other shortcuts will automatically redirect to the host file. Attempting to delete the host entity of a shortcut will optionally display a warning message about all shortcuts to that entity also being deleted.

Current workarounds

  • Creating a stub file to redirect to the correct file
  • Creating an alternative index page, like a table of contents, that enables duplicates
  • Using alternative ways to navigate the vault like wikilinks, favorites, or searching
  • Re-arrange the file structure

I wanted to add additional features:

  • If a folder becomes a shortcut; then the shortcut version of the folder can be opened into a virtual version of the real folder. For example: if I have a folder with the name “fruit” and sub-folders named “apple”, “orange”, and “banana” and I have a different folder in a different part of the vault that is named “Food”, you can put the folder shortcut for “fruit” inside of the folder for “food” and be able to access the entire folder as if it was the original. Changes of course will only happen in the actual source.

    • The aliased version of the files in the shortcut folder will have an indication that it is virtual, by darkening the color of the entry names.
    • Recursive folder shortcuts in the aliased version of a folder will be greyed and crossed out to avoid infinite recursion, other shortcut and folder options still work normally unless that folder is the same as the root folder of the tree.
  • You can right-click while hovering over a shortcut to select an option to navigate to the original in the file view (such as if it is in a collapsed folder)

  • You can right-click while hovering over a shortcut to select an option to switch the locations between the original entity, and the selected shortcut.