Closed Devric closed 10 years ago
It is possible only if you open vim itself with sudo
There is also an old vi trick that allows you to save a file even if you didn't open it with sudo
:
:w !sudo tee %
http://stackoverflow.com/questions/1005/getting-root-permissions-on-a-file-inside-of-vi http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work
is it possible to open and edit files like /etc/hosts