vim-grepper icon indicating copy to clipboard operation
vim-grepper copied to clipboard

Jumping jumps to line instead of character

Open sheerun opened this issue 4 years ago • 6 comments

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?

sheerun avatar Jun 17 '20 12:06 sheerun

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

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

lbonn avatar Jun 17 '20 12:06 lbonn

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

sheerun avatar Jun 17 '20 13:06 sheerun

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).

lbonn avatar Jun 17 '20 15:06 lbonn

it doesn't work ripgrep

sheerun avatar Jun 17 '20 17:06 sheerun

@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?

rafikdraoui avatar Jul 12 '20 15:07 rafikdraoui

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

sheerun avatar Jul 12 '20 15:07 sheerun