How to prevent a VIM file from becoming read-only when edited via a Windows symbolic link?

6

0

I've set nobackup and nowritebackup per this question - VIM destroys symbolic links under Windows

However, whenever I modify the file via the link, the target file is set to read-only.

How can I prevent the link target from becoming read-only?

aryeh

Posted 2011-12-01T01:06:33.427

Reputation: 161

Do symbolic links on Windows have an extension? – Dorian Patterson – 2012-04-18T01:48:58.890

Is this symbolic link pointing to a file on a windows share? or an NFS-connected drive? Are the files linked to local files (same disk essentially)? – lornix – 2012-06-30T20:03:38.810

Answers

2

This seems like a bug in VIM incorrectly interpreting file-attributes on Windows.

The bug is described in 'backupcopy' and Windows Vista symbolic links, where a patch was developed to solve the problem.

I believe you will just have to wait until that patch finds its way to the release. Your other options are to download the latest VIM patch (if later than your version) or to compile your own, and if the bug is still not fixed report it again to the VIM developers.

harrymc

Posted 2011-12-01T01:06:33.427

Reputation: 306 093