Skip to content

Instantly share code, notes, and snippets.

@retrography
Created September 9, 2019 22:10
Show Gist options
  • Save retrography/be956222a4e9a417b55bbba9f693f48e to your computer and use it in GitHub Desktop.
Save retrography/be956222a4e9a417b55bbba9f693f48e to your computer and use it in GitHub Desktop.
How to save a readonly file opened in Vim
:w !sudo tee %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment