On 12/08/10 06:29, John wrote:
Hi all,

I'm using Vim 7.2.411 on Windows XP (from the Cream web site), to edit
files hosted on a linux server.  I have the linux directory as a
Windows mapped network drive (via samba).

If via the linux box, I set the permissions on a file to 775, I can
edit and save the file in Notepad and Wordpad, through the mapped
network drive, and the permissions are retained.  But if I do the same
editing in Vim, saving the file reverts its permissions to 644.

I'm getting sick of typing 'chmod 775'... and I'd rather not use .*pad
- any tips?

Thank you,
John


Try using
        :set backupcopy=yes

This should overwrite the old file with the new version (using a copy for the backup if any) thus preserving any attributes the file may have. The alternative is renaming the old file as backup and creating a new file for the new version (which is faster, but may sometimes lose some attributes, e.g. when editing from Windows a network file on a Unix server).

See :help 'backupcopy'


Best regards,
Tony.
--
The word "spine" is, of course, an anagram of "penis".  This is true in
almost fifty percent of the languages of the Galaxy, and many people
have attempted to explain why.  Usually these explanations get bogged
down in silly puns about "standing erect".
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to