Created
January 23, 2016 05:32
-
-
Save soardex/1a59c2cee24e6c9329cd to your computer and use it in GitHub Desktop.
Vim Save On Read-Only File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set autoread so there are no interactive Load File option | |
:set ar | |
# save the command using tee and discard tee echo | |
:w !sudo tee % > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment