Skip to content

Instantly share code, notes, and snippets.

@gumayunov
Created August 27, 2009 07:45
Show Gist options
  • Save gumayunov/176164 to your computer and use it in GitHub Desktop.
Save gumayunov/176164 to your computer and use it in GitHub Desktop.
:Find CUser ./lib
function! s:FindEmAll(needle, path)
cgetexpr system('find '.a:path.' -type f -not \( -iname "*.swp" -or -iname "*.jpg" -or -iname "*.png" -or -iname "*.gif" -or -iname "*.log" \) -print0 \| xargs -0 egrep -n "'.a:needle.'" \| sed -e "s/:(\d+)/\|$1\|/"' )
copen
wincmd L
endfunction
command! -complete=file -nargs=+ Find call s:FindEmAll(<f-args>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment