On Wednesday, May 30, 2012 3:11:55 AM UTC-5, Robert Bu wrote: > Hi, > > I have a file, say "test.txt", in Cygwin, which does not have > executable property. The file property is > -rw-------+ 1 user Domain Users 16 May 30 16:04 test.txt > > After I edited it with Windows native vim and saved the file, I can > see it has executable property in Cygwin. The file property now is > -rwx------+ 1 robert_bu Domain Users 16 May 30 16:10 test.txt* > > Is there any way to tell Windows VIM to preserve the original file > property? >
Maybe you want the 'backupcopy' option, to tell Vim to just modify the original file, rather than renaming the write backup file to replace the original. See :help 'backupcopy'. I'm not CERTAIN this will work, but it at least stands a chance. It also might be possible to hook a chmod command into a BufWritePost autocmd to restore permissions read in during a BufWritePre autocmd, if 'backupcopy' doesn't help. -- 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
