I want to redirect the output of some Windows program directly to gvim basically for searching the output. Say for example the result of findstr cmd. Is it possible to do this without dumping it to a file and subsequently loading that file in gvim?
+15
A:
sure:
dir | gvim -
the -
option tells vim
to open stdin
This works for Windows and Linux versions.
Nathan Fellman
2009-05-13 06:30:19
Wow. Must remember this. Cheers Nathan
2009-05-13 06:41:04
+10
A:
If you're already in Vim you can use the r
command to read like this:
:r !<cmd>
E.g.
:r !dir
Brian Rasmussen
2009-05-13 06:33:04