Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't seem to be able to search like I used to. #29

Open
Frydac opened this issue Sep 15, 2018 · 4 comments
Open

Don't seem to be able to search like I used to. #29

Frydac opened this issue Sep 15, 2018 · 4 comments

Comments

@Frydac
Copy link

Frydac commented Sep 15, 2018

Hi,

EDIT: apparently I interpreted some things wrongly in my last explanation, maybe I hadn't updated git or something,.. don't remember how I came to the conclusion, everything seems to work.. though maybe a bit different than I was used to.

Following search pattern used to work, but doesn't anymore as such:
:Rg -g *.chai pattern
but when I quote the glob pattern, it does seem to work:
:Rg -g "*.chai" pattern

Though slightly annoying, I can live with that, for me this issue can be closed now.

@dlants
Copy link

dlants commented Sep 17, 2018

+1 ... using --glob is a very common thing for me as well, and I can't seem to get it to work now.

If it's still possible, it would be nice to put up an example of how to use that option in the README

@Frydac
Copy link
Author

Frydac commented Sep 24, 2018

I updated my original post to remove some wrong explanation, in order to not confuse potential readers.

@BrendanTimmons
Copy link

BrendanTimmons commented Nov 12, 2019

I am also having this issue.

rg <pattern> -t js
rg <pattern> -g '*.js'

both return results in shell but inside of vim they do not when using :Rg ...

Even when attempting OP's solution it does not work for me:
:Rg -g "*.scss" background
:Rg background -g "*.scss"
both return no results but a simple rg background -g '*.scss' does or even rg background -tcss works too in shell.

@Frydac
Copy link
Author

Frydac commented Nov 14, 2019

I forgot about this, apparently it works again on my system without the quotes.
I don't understand why though, there haven't been any new commits since my original post.

I'm using

VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 29 2019 22:27:49)
Included patches: 1-2102
Compiled by Arch Linux
ripgrep 11.0.2

Looking at the source, you could try and add

  echom &grepprg
  echom &grepformat
  echom 'grep! ' . l:rgopts . a:txt

in vim-ripgrep.vim around line 64 before

silent! exe 'grep! ' . l:rgopts . a:txt

To try and see what is executed (then use :messages after executing your :Rg command to see the printed echom's), and maybe manually set grepprg and execute similar :grep commands, and be sure check :RgRoot command to show in which directory this is executed, maybe that is the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants