I've been learning about :grep
, and I'd like to suppress its output and view it in a quickfix window instead as many seem to suggest. However, it seems that whenever grep produces too much output, it fills the window, and I'm unable to make the unwanted output go away without manually <C-l>
.
Things I've tried:
silent grep! test -R .
does not suppress grep output for some reason, output fills the screenexecute 'silent grep! test -R .' | copen
The quickfix window opens, and some parts of the screen remain with my original window contents; however, all the indentations are filled with grep output, and remain until<C-l>
silent! execute 'silent grep! test -R .' | redraw | copen | redraw
has the exact same behaviour as above
Running :set grepprg?
yields grepprg=grep -n $* /dev/null
. And :version
yields VIM - Vi IMproved 9.0 Included patches: 1-2116
.
Distro: NixOS
This seems to reproduce on vim -u NONE
.
This only seems to occur when the grep output is more than one screenful; less than that, grep output is suppressed without issue.
I'm using kitty. On the other hand, I had set my TERM to xterm-256color, I guess for some compatibility reasons? Perhaps that may be related.
xterm-256color
, I guess for some compatibility reasons? Perhaps that may be related.