sudo write in vim

After editing a file, you discover that its mode won't allow you to save.
Then you do:

:w !sudo tee % > /dev/null

1 comment:

cristoper said...

Excellent. Thank you.