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 do I search with a pattern that contains a space? #221

Closed
rightfold opened this issue Aug 10, 2017 · 5 comments
Closed

How do I search with a pattern that contains a space? #221

rightfold opened this issue Aug 10, 2017 · 5 comments

Comments

@rightfold
Copy link
Contributor

I tried several things, like :Ack foo bar src and :Ack "foo bar" src but they don't search for "foo bar" in src/. I also can't find it in the documentation. How do I search with a pattern that contains whitespace?

@benoittgt
Copy link

:Ack "foo bar" src should work. Tested only with CLI and it works. If you try with -Q do you have the same result?

-Q, --literal Quote all metacharacters; PATTERN is literal

@petdance
Copy link

-Q should have no effect, because there are no regex metachars involved.

@rightfold
Copy link
Contributor Author

I found it: I have to use single quotes: :Ack 'foo bar' src

@JonnyRa
Copy link

JonnyRa commented Nov 3, 2017

maybe this documentation should move the front page?

rightfold added a commit to rightfold/ack.vim that referenced this issue Nov 3, 2017
@ches ches closed this as completed in #228 Nov 5, 2017
ches pushed a commit that referenced this issue Nov 5, 2017
@JonnyRa
Copy link

JonnyRa commented Nov 6, 2017

Nice one!

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

4 participants