I cloned the latest Ack.vim and had it installed using Pathogen (amazing plugin if you haven't tried it). When I went to use the bang option to prevent opening the first result (thanks for adding this feature, btw!), I would get:
|| /bin/bash: ack -H --nocolor --nogroup: command not found
as my error message in the quickfix window. This seemed symptomatic of the ack script not being in my $PATH or something like that, but ack worked fine from my shell prompt. As it also did with all the flags passed to it (-H --nocolor --nogroup --column) in the Ack.vim script.
Eventually after much poking, I saw the following line was in a "if !exists("g:ackprg") block in the script. Even when I added the commented out line to let g:ackprg.... to my .vimrc, the plugin still didn't work.
So finally I just removed the if !exists block and left the blow line in the script:
let g:ackprg="ack -H --nocolor --nogroup --column"
I cloned the latest Ack.vim and had it installed using Pathogen (amazing plugin if you haven't tried it). When I went to use the bang option to prevent opening the first result (thanks for adding this feature, btw!), I would get:
as my error message in the quickfix window. This seemed symptomatic of the ack script not being in my $PATH or something like that, but ack worked fine from my shell prompt. As it also did with all the flags passed to it (
-H --nocolor --nogroup --column
) in the Ack.vim script.Eventually after much poking, I saw the following line was in a
"if !exists("g:ackprg")
block in the script. Even when I added the commented out line to let g:ackprg.... to my .vimrc, the plugin still didn't work.So finally I just removed the
if !exists
block and left the blow line in the script:Now it works great!
So..maybe reconsider the need of that if block??