Obsidian presently allows renaming a file (at least inside of Obsidian) which automatically updates all the links in other files mentioning that file. This is a great feature and we all love it quite a lot.
However, the reverse doesn’t work. If I rename a link instead, the file name doesn’t update back. This is by design I reckon since one might want to change a link to either a different but similarly named file or a new empty file altogether.
I think it’d be helpful if there was a shortcut (say F2 on Windows or ⌘+⏎ on the Mac) which when pressed over a link would rename the linkandupdate the filename of the linked file, thereby also automatically renaming all the other links (which already works). Some visual indicator could be shown to the user like a border around the link or a auto-suggest type panel to differentiate between normally editing a link text vs renaming the link+file.
I was making a macro to achieve this by opening the link in a new pane, bringing the cursor to the file name and when pressing return, closing that pane. I got stuck since we cannot move the cursor to the file name from a note yet which made me think that this could be built in!
The most Mac-like way I think that could be handled (which will also fulfil another request) is to identify the file in the file explorer, highlight it with slight animation and begin renaming I think there and as soon as user hits return, animate slightly and bring the cursor back at the link.
I understand some of this might not be possible (or easy enough to dedicate Dev resources on) in electron so a simpler way might be just a small pop up showing the old file name with a preview perhaps and a field for the new one with the number of links which would be updated when user hits return shown on the side.
Like Silver mentioned, it would be very important that this was a conscious and explicit command or mode. Not something that you could accidentally invoke while typing too quickly.
For example, you definitely wouldn’t want to fix a typo and have all your links change. I just accidentally autofilled “Freelancing” in a link instead of “Freewriting”, and then fixed it. I would not have wanted my Freelancing links to all change because of that. Especially if I didn’t notice it had happened!
I would love this feature. will save alot of time if i can change names from a large table of content, rather than having to go into every note individually.