Open hanxi opened 7 years ago
Just like this https://github.com/mhinz/vim-grepper/blob/master/autoload/grepper.vim#L642
In cases where the arguments don't come last, use $ as a placeholder: `'grepprg': 'grep -Rn $ .'`
Because I want use set search path in ack.vim for my project like this in grepper:
function! FindProjectRoot(lookFor) let pathMaker='%:p' while(len(expand(pathMaker))>len(expand(pathMaker.':h'))) let pathMaker=pathMaker.':h' let fileToCheck=expand(pathMaker).'/'.a:lookFor if filereadable(fileToCheck)||isdirectory(fileToCheck) return expand(pathMaker) endif endwhile return expand('%:p:h') endfunction nmap gs <plug>(GrepperOperator) xmap gs <plug>(GrepperOperator) let g:grepper = {} let g:grepper.ag = {} let g:grepper.ag.grepprg = 'ag --vimgrep $* '.FindProjectRoot('.project')
Hi, sorry for the slow response—this is not currently supported, but it's a nice feature, I'd accept it as a contribution.
Just like this https://github.com/mhinz/vim-grepper/blob/master/autoload/grepper.vim#L642
Because I want use set search path in ack.vim for my project like this in grepper: