This opens a new tab with the grepped output. I simply navigate to the line so my cursor is on the filename, then
C-w gf
That's [Ctrl-W] followed by [g] and [f]
And just like that, the file is open in yet another tab. The best part? Since the grep output is just another vim buffer, I can search it as well, just like any other buffer.
And yes, ofc the above can be put into a custom command, just by putting this in the .vimrc:
command -nargs=1 Gr :tabnew | r ! shopt -s globstar && grep -sn <args> **
And just like that, the file is open in yet another tab. The best part? Since the grep output is just another vim buffer, I can search it as well, just like any other buffer.
And yes, ofc the above can be put into a custom command, just by putting this in the .vimrc:
Then the whole thing can be used like