Skip to content

Instantly share code, notes, and snippets.

@scrooloose
Created April 11, 2014 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scrooloose/10461481 to your computer and use it in GitHub Desktop.
Save scrooloose/10461481 to your computer and use it in GitHub Desktop.
"stick this in your ~/.vimrc
"could probably do this all on one line in the autocmd declaration but whatever
autocmd vimenter * call s:CheckForForgettingSudo()
function s:CheckForForgettingSudo()
if &readonly
echoerr "Use sudo beyotch!"
exit
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment