Wolfgang Schmidt wrote:
Wolfgang Schmidt wrote:
when I try to write (:w) a certain buffer, I get E505 (~ "file XXX is write-protected, override with w!"). The protection seems to be set by Vim, not the OS (WinXP). So I looked for the "readonly" option value, but it's set to "noreadonly". I also checked "write", which is set to "write". Nevertheless, everytime I try to :w the file, I get this E505 dialog. Any hints? I'm running Gvim 7.0 on Win XP)

are you able to write the file with ":w!"? If not, the file might be
opened exclusively or with write-access denied by another program.

Regards,
Jürgen


With ":w!" the file can be written, so this can't be the problem.

Thanks, though ...

   Wolfgang






Then the file might be write-protected by Windows (any program can override that if it takes extra steps for it). Try

        attrib filename.ext

in CMD.EXE (where "filename.ext" is the name of the file). There are four possible attributes, each of which may either appear or be replaced by a space or period:

        H "hidden" : doesn't appear in DIR listings
        S "system" : a special kind of hidden file
R "readonly" : the file cannot be written, except by clearing this flag first
        A "archive" : the file has been archived.

To be "normally writable", the file should have either no flags at all, or else only A.

To change the flags, use for instance

        attrib -R +A filename.ext

(minus to clear, plus to set).


Best regards,
Tony.

Reply via email to