[2013-06-28] save edited file in vim as root

If you start to edit a file as a regular user and realise you should have done it as root. You can still save the files as root:

:w !sudo tee %

or

:w !sudo tee new-file.name