Vim
:w sudo tee %
Write out the current file using `sudo`.
Syntax
$:w sudo tee %
Examples
$:w sudo tee %
Typical use cases
?
Standard usage
:w sudo tee % --help
Note
Global and Exiting. Saves the file with sudo privileges.
Export