How do I make a file writable from Vim on a Windows machine? I currently manually go find the file in explorer, open it's properties and uncheck readonly. I would like to be able to do this more quickly.
It seems attrib
is the Windows shell command to modify file attributes.
See :!attrib /?
:!attrib -R %
should remove the Read only property on the file. (It is working here the [RO] flag is modified in my status bar).
You will be prompted to reload the file (if you don't have autoread
set) : don't ! and then save with :w!
(Rereading your question I am not sure that the Read only flag is your issue there because :w! should work anyway. )
Maybe I am missing something but :w!
works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With