I'm using vim inside gnome-terminal in Ubuntu 12.04 and also in MacOS's terminal. I use the ack.vim plugin to perform project wide textual searches and it works fine but there's an uncomfortable and distracting bug:
When you perform a search, the whole vim screen goes back to the terminal and shows ack's output as it runs. When it stops running, the screen goes back to vim and the search results are correctly shown. Also, when you quit vim, all of ack's output will be there in the terminal.
I'm aware of this issue https://github.com/mileszs/ack.vim/issues/18 but I wanted to post it here to see if I can get ideas on how to fix it.
In ack.vim I can see the line silent execute a:cmd . " " . l:grepargs
which I think is where the ack command is actually being run. The silent option is already there, that's as far as my vim-fu takes me. :S
Anyone has any ideas on how to fix this?
This is a problem of how vim own :grep*
commands work, not something that is ack.vim
issue. You can’t prevent using the terminal, but setting shellpipe
to >
, &>
or 2>/dev/null>
will prevent command from duplicating the output to the terminal (by default this option is 2>&1|tee
and &>
or 2>&1>
values are the closest to what is currently done).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With