Automatically replace [[a/b/c]] with [c]([[a/b/c]])?

I like to categorize my pages hierarchically, so I often have pages like a/b/c. When entering a link to the page like [[a/b/c, the autosuggest will let me press Enter to insert [[a/b/c]]. However usually c alone is enough to indicate which page I’m referencing. It would be great id the autosuggest widget could instead insert [c]([[a/b/c/]]) so that when viewing I don’t see the entire, needlessly long page title.

I am doing that exact thing manually and it’s quite a chore but it’s much better looking than a half screen width worth of namespaces.

I am doing something along /a/b/c/d@c, where d@c is 100% unique in all my graph so basically d@c is enough to reference the whole namespace.

What could you do is make d@c an alias of /a/b/c/d@c and whenever you will write [[d@c]] it will take you to your namespace page.

I personally don’t like that as it doesn’t play well with the markdown backend.

So in your case, make c an alias for the /a/b/c page.

Consider this customization:
Abbreviations for links in the same namespace with page

2 Likes

Just in case you give up on namespaces, here there is an alternative method to organize pages hierarchically that has worked very well for me, with no downsides at the moment.

Namespaces are more to disambiguate pages as I explained here.

So far the best use I have found for namespaces is adding multiple tags at once. For example #person/author also adds #person.