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 link and update 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.
Great request, surprised it isn’t already on the forum. Only thing I would add is to extend this to headings as well.
You’re right, that would be convenient. Just need to make sure the user is super conscious about what they are doing though.
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!
Maybe if this is combined with a preview like the one on hover?
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.
I think it’s a good idea.
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’d love this for renaming pasted images too, rather than having to find them in the file explorer and rename them there.
Even better would be the ability to enter a full path and have the image/document moved to that folder too. E.g.
Renaming to “Picture1.png” renames the file in its current location and updates all links.
Renaming to “Resources/Picture1.png” renames the file it Picture1.png, moves it to the /Resources folder and updates all the links.
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.
this will be implemented in v0.11