mileszs/ack.vim

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

no-longer-on-githu-b opened this issue ยท 5 comments

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?

: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

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

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

maybe this documentation should move the front page?

Nice one!