mhinz / vim-grepper

:space_invader: Helps you win at grep.
MIT License
1.22k stars 58 forks source link

Jumping jumps to line instead of character #229

Open sheerun opened 4 years ago

sheerun commented 4 years ago

It seems that jumping to search results (at least when using quick list) is jumping to the line that matched, instead of characters that matched, like /. Is there a way to configure it?

lbonn commented 4 years ago

You can customize grepprg and grepformat to not contain a column ("%c").

See vim-grepper's docs and :help errorformat.

sheerun commented 4 years ago

What I mean is that it doesn't contain column by default

lbonn commented 4 years ago

Ah ok the title of the issue sounds like you were looking for the opposite.

Then it should work out of the box if you use a tool that supports it: ag, rg, sift, ack, ack-grep, git (recent versions).

sheerun commented 4 years ago

it doesn't work ripgrep

rafikdraoui commented 4 years ago

@sheerun What is the value of g:grepper.rg.grepformat? By default, it's f:%l:%c:%m,%f, which should recognize column numbers. Otherwise maybe g:grepper.rg.grepprg is set to something that doesn't output column numbers?

sheerun commented 4 years ago

I haven't changed the default. https://github.com/jremmen/vim-ripgrep works for me