Skip to content

Instantly share code, notes, and snippets.

@ajithbh
Last active January 1, 2016 13:49
Show Gist options
  • Save ajithbh/8153973 to your computer and use it in GitHub Desktop.
Save ajithbh/8153973 to your computer and use it in GitHub Desktop.
If you forgot "sudo vim"
If you forgot "sudo vim" and get error "Can't open file for writing"
:w !sudo tee %
http://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment