Here are a few Unix command line tricks that I've learned recently.
... | vim -
Edit search results by piping text into
vim - instead of
tr -s ' '
Squeeze consecutive spaces into a single space. Also works for other characters.
Display lines before (
-B) and after (
-A) a matching line.
I find these flags confusing, since they could be "Above" and "Below".