ag.vim icon indicating copy to clipboard operation
ag.vim copied to clipboard

Can't jump when searching within a file

Open 3cooper opened this issue 10 years ago • 6 comments

If I run:

:Ag searchString myFile.vim

I get results, but am unable to navigate to the lines via the quick fix window. I can scroll through them but hitting the enter key does not take me to the line.

screen shot 2015-02-10 at 9 58 53 am

3cooper avatar Feb 10 '15 14:02 3cooper

Thanks for the bug report!

Could you post the following?

  • When running vim:
    • The output of :let g:ag_prg and :let g:agprg (if any)
    • The output of :let g:ag_format and :let g:agformat (if any)
  • When in a shell:
    • The output of ag --version

losingkeys avatar Feb 11 '15 01:02 losingkeys

:let g:ag_prg
g:ag_prg               ag --column

:let g:agprg
E121: Undefined variable: g:agprg

:let g:ag_format
g:ag_format            %f:%l:%c:%m

:let g:agformat
 E121: Undefined variable: g:agformat

ag --version
ag version 0.18.1

3cooper avatar Feb 11 '15 14:02 3cooper

That all looks ok, but I'm thinking the out of ag changed. 0.18.1 was released a couple years ago, so I bet updating does the trick. I'll try to find some time to install that version and try it out myself though.

losingkeys avatar Feb 13 '15 00:02 losingkeys

Didn't realize I was that far behind. Will update and give it a try.

Sent from my iPhone

On Feb 12, 2015, at 7:06 PM, Josh Hoff [email protected] wrote:

That all looks ok, but I'm thinking the out of ag changed. 0.18.1 was released a couple years ago, so I bet updating does the trick. I'll try to find some time to install that version and try it out myself though.

— Reply to this email directly or view it on GitHub.

3cooper avatar Feb 13 '15 01:02 3cooper

i met the same problem too, when's the bugfix come?

xitijie avatar Jan 04 '16 10:01 xitijie

@xitijie @3cooper @losingkeys so am i, this is due to ag_prg and ag_format are not set correctly.
this is to say: ag_prg and ag_format shoud match each other.
for example:

  • let g:ag_prg=ag --cloumn match let g:ag_format="%f:%c:%m"
  • let g:ag_prg=ag --line-numbers --column match let g:ag_format="%f:%l:%c:%m"

by the way, i guess the meaning of ag_format: %f: file, %m: match content, %l: line-numbers, %c: column, and %f:%m is default output.

helinbo2015 avatar Mar 11 '17 10:03 helinbo2015