Saving a file with root permissions

In order to save a file with root permission using vim you can do

:w !sudo tee %