Vim: Saving files as root after opening
Sometimes you open a file that requires root privileges and just forget about opening it with sudo. Not a problem, just save it with sudo directly from Vim:
:w !sudo tee %
Written by Caio Ariede
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#