Reputation: 13048
In my Vim configuration I have both Ack.vim and AsyncRun plugins. Both plugins, at least by default, output to a quickfix
window. This is an issue for me because I need to have Ack.vim results open, and then execute AsyncRun commands while processing those results. But once AsyncRun is executed, it overwrites Ack.vim results with its output, so I have to re-run same :Ack
search to get next search results displayed.
Example: my workflow often includes search with :Ack
, after which I modify one file from the results, write the file, then modify the file from the next result, and so on. However, I also have autocmd BufWritePost
configuration which runs an AsyncRun (e.g. JS prettier
or Python's yapf
) when a buffer is written. Thus, once I modify the first file and write the buffer, output from Ack.vim gets replaced by the output from AsyncRun.
Is there a way to either:
use location-list
for either of the Ack.vim or AsyncRun, instead of the quickfix
window?
or have two quickfix
windows at the same time, each for each of the plugins' outputs?
or, even suppress AsyncRun output and not open the quickfix
at all for it? (in my case, when running yapf
or prettier
, I don't really need to study their output at all)
Upvotes: 0
Views: 266
Reputation: 10056
Have a look at Ack.vim's documentation. There are a bunch of other commands, such as :LAck
, which populates the location list rather than the quickfix list.
The quickfix window is global, so you can only have one at a time. But you can always navigate to the previous and next quickfix list with :cprevious
and :cnext
. The location-list on the other hand is per window.
I suggest to skim through the quickfix and location-list documentation with :help quickfix
.
Upvotes: 2