tadashi-aikawa / obsidian-various-complements-plugin

This plugin for Obsidian enables you complete words like the auto-completion of IDE.
MIT License
599 stars 22 forks source link

Q: How to auto rename internal link complement #304

Closed l2eused closed 3 months ago

l2eused commented 3 months ago

I set new link format to relative path to file and in #116 it already impliment link to match obsidian settings.

somehow, I want to auto rename like obsidian internal link suggest does. (example: ../foo/bar will create [[../foo/bar|bar]])

I see that it has option insert an alias that transformed from the displayed internal link that my solve my problem. but I don't know how to use regex... I tried to learn how to code it before but no luck... I still confuse and can't learn it by myself. so I open this issue to ask question...

Thanks

tldr; I want to insert alt name when enter internal link complement. from [[../path1/path2/filename]] to [[../path1/path2/filename|filename]]

tadashi-aikawa commented 3 months ago

Hi, @l2eused :)

Please try to set .+/(?<name>.+)$ 👍

image

l2eused commented 3 months ago

thanks