Created
May 9, 2011 05:26
-
-
Save richo/962097 to your computer and use it in GitHub Desktop.
vimscript - Don't search in dumb places
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
" Original Authoer Araxia@Freenode/#vim | |
function! RecursiveFileSearch(callback) " {{{ | |
let bad_paths = '^\(' . expand('~') . '\|' . expand('/') .'\)$' | |
if match(getcwd(), bad_paths) > -1 | |
echo printf("Are you kidding? You want to recursively search in '%s'?", getcwd()) | |
else | |
exe a:callback | |
end | |
endf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment