mileszs / ack.vim

Vim plugin for the Perl module / CLI script 'ack'
Other
3.08k stars 396 forks source link

Fallback to matching filename with grepformat. #258

Open DArtagan opened 5 years ago

DArtagan commented 5 years ago

When one uses the -l option to look for just files containing a search term, but not every result:

:Ack -l search_term

The current results look like:

|| csc/models/staging/staging_factory.py
|| csc/models/factory_base.py
|| csc/models/protocols.py

Which breaks the quickfix list's ability to jump.

With this changes, the results will now look like:

csc/models/staging/staging_factory.py|| 
csc/models/factory_base.py|| 
csc/models/protocols.py|| 

Full confession: I'm a ag-based searcher. And this use case only appears when using a custom ackprg value. Otherwise the default -H and the -l options are mutually exclusive in ack.