Created
April 11, 2014 11:47
-
-
Save scrooloose/10461481 to your computer and use it in GitHub Desktop.
This file contains 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
"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