When using Vim is there a way that :grep
or :vimgrep
will color the patterns returned to the buffer?
If you search for the pattern after you've :vimgrep'd it, Vim will highlight it. Just edit the :vimgrep pattern files
into :g/pattern/
.
For a richer solution, try this script.
You can use the Unix grep:
:!grep --color pattern %
There may be other solutions using internal grep/vimgrep but this one works for me.
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