On Aug 16, 6:29 pm, John <[email protected]> wrote: > > I'm currently contemplating adding autocmds for BufWritePre and > BufWritePost, to check if the file is accessible under cygwin, or via > ssh to a linux server, and send the appropriate commands to get the > file permissions before write, then restore them afterwards. I'll let > update the thread with my results - though I'm still very open to > simpler suggestions!
I thought it was in this thread, but apparently not... You may be able to make a BufWriteCmd autocmd that uses the writefile() function. It would be quite a kludge, bypassing Vim's normal write mechanisms to do it your way, but :help writefile() flat- out says "an existing file is overwritten, if possible" which I understand is the desire here. And I think this kludge would be easier than wrapping the write in a get-permissions/set-permissions event pair. -- 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
