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

How to limit search by file type? #47

Open
benfrain opened this issue Nov 22, 2019 · 1 comment
Open

How to limit search by file type? #47

benfrain opened this issue Nov 22, 2019 · 1 comment

Comments

@benfrain
Copy link

Happy to update the docs with this info if anyone can point in the right direction.

Outside of Vim you can do rg sausages -tcss to search for sausages in any file type of 'css'. How do you pass the same file type limit argument in Vim?

@Frydac
Copy link

Frydac commented Jul 21, 2020

For me that just works (on linux)
:Rg pattern -tcss and :Rg -tcss pattern work.
You have to specify pattern, as the script will only expand the current word when there are no arguments (if I understand correctly). You can manually expand the current word under the cursor on the vim command line with <c-r><c-w> (see :h c_<c-r>)

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

2 participants