Remove a file's "read only" attribute in vim after editing it and saving with :w!
You should be able to use just *
:
autocmd BufWrite * !chmod u+w %
It may be better to use BufWriteCmd
instead. I think that if the chmod
fails, Vim will not attempt to write.