Sometimes you open a file that you need root permissions to save it.
When it happen, you can close and reopen the Vim (with sudo) or you also can do:
:w !sudo tee %
Thanks to @dlisboa for the tip.
Sometimes you open a file that you need root permissions to save it.
When it happen, you can close and reopen the Vim (with sudo) or you also can do:
:w !sudo tee %
Thanks to @dlisboa for the tip.