Re:Dropbox no longer follows symlinks to items outside of yo...
by codetrotter on Saturday August 31, 2019 @04:10PM
(#20848537)
I’ve used symlinked bashrc and other files and edited them with Vim through their symlinks and never had the sorts of problem you theorized about.
I would consider the behavior you outline to be an editor bug. Symlinks are pretty important and any editor that would destroy a symlink and replace it with a regular file is clearly misbehaving software IMO.
(I think that’s a fairly common strategy. I tried checking whether vim uses it, but got lost in https://github.com/vim/vim/blob/master/src/fileio.c; that file is too large to comfortably read on an iPad (try guessing how many lines of C it takes to ”Read lines from file "fname" into the buffer after line "from"”)