Created
August 27, 2009 07:45
-
-
Save gumayunov/176164 to your computer and use it in GitHub Desktop.
:Find CUser ./lib
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
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