If you edit a file with vi as normal user, but need superuser rights to save it, you can use this sequence to save it using sudo:
:w !sudo tee %
/hat tip to @nistude Show archive.org snapshot
Posted by Matthias Marschall to Matthias Marschall (2011-08-10 16:07)