I sometimes open files in vim which have admin only permissions, such as config files in the program files. I edit these and attempt to save them only to discover that the file is readonly and I can't save in the original location. I have to save the file in a different place a copy it over the top.
I want to just issue a vim command to run the write as root, is this possible?
There is a unix verison here using sudo and tee What are the dark corners of Vim your mom never told you about?