To open files in Grep's output to Vim's -o -mode

Try

vim -p `grep -il sid *`

if you want to open the files in different tabs in the same window.


Run:

grep -il sid * | vim -

This tell vim to read the file from stdin, so the output of grep will be in vim. Now, put cursor on file and press gF - this will open the file on the line grep indicated.

You can also use ^WF to open file in a new split.


Second one works for me. Third too, although you get only one file visible at the start. 4 is the same as 2 in most cases. First and last should not work by design.