Skip to content

Instantly share code, notes, and snippets.

@Swop
Created May 16, 2013 11:48
Show Gist options
  • Save Swop/5591187 to your computer and use it in GitHub Desktop.
Save Swop/5591187 to your computer and use it in GitHub Desktop.
Vim: save the file as root (by Vincent Jousse)
" Paste this in your .vimrc file
" Use w!! when you've forgotten to open your file as root
cmap w!! w !sudo tee % >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment