Skip to content

Instantly share code, notes, and snippets.

@richo
Created May 9, 2011 05:26
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 richo/962097 to your computer and use it in GitHub Desktop.
Save richo/962097 to your computer and use it in GitHub Desktop.
vimscript - Don't search in dumb places
" 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