asyncrun.vim icon indicating copy to clipboard operation
asyncrun.vim copied to clipboard

Is there an option to remove "||" in the quickfix output?

Open zoumi opened this issue 4 years ago • 5 comments

asyncrun.vim will output something like this

|| [xxxxxx]
...
...
|| Hello, world!
|| [Finished in 2 seconds]

I need copy the output of my cmd. Can I tell asyncrun.vim to not add "||" at the begin of line? (I need error format be captured, so I can't use "-raw" option)

zoumi avatar Jun 19 '21 05:06 zoumi

FWIW, it looks like Vim itself adds the "||" to the quickfix contents when displaying them. You can verify this by inspecting the list returned from getqflist() -- the quickfix entries themselves do not contain the leading "||".

I searched around for a way to modify the way Vim displays the quickfix list, but it doesn't appear to be configurable. Your best (only?) bet may be to use an autocommand to temporarily make the quickfix buffer modifiable, and then to do a substitution to remove the leading pipes. At that point, though, you may begin to wonder (as I did) if the quickfix buffer is really the right tool for the job...

jobo3208 avatar Dec 21 '21 15:12 jobo3208

try this:

:AsyncRun -mode=term -pos=TAB  ls -la

skywind3000 avatar Dec 21 '21 15:12 skywind3000

Thanks! I didn't even think of using the built-in terminal. (I don't have much experience with it.) This indeed gets rid of the leading pipes, and feels like the more appropriate tool for my particular use case.

jobo3208 avatar Dec 21 '21 16:12 jobo3208

But that makes the qf not to update :(

aemonge avatar Sep 06 '22 18:09 aemonge

"||" is a part of quickfix window, you can copy content from quickfix and remove the first 2 columns.

skywind3000 avatar Sep 07 '22 06:09 skywind3000