Hacker News new | ask | show | jobs
by bgaluszka 3560 days ago
I often use `git grep something | vim -` which puts list of files into vim with line numbers, and then I do `gF` to get to file and particular line.
1 comments

I didn't realize vim supported reading from standard in, thanks!
You can go one further. I have an alias 'cbuf=vim - -ccbuf!'

This takes whatever is piped in and loads it into the quickfix list. So I get locations out of anything with lines of the format "file:line: something" or "file:line:col: something".

Eg: git grep -n | cbuf