I was wondering if there's a way to see the output of any command, straight inside vim, rather than first redirecting it into a file and then opening that file.
E.x. I need something like
$ gvim < diff -r dir1/ dir2/
This gives ambiguous redirect error message
I just want to see the diffs between dir1 and dir2 straight inside gvim.
Can any one provide a nice hack?
diff file1 file2 | vim -R -
The -R
makes it read-only so you don't accidentally modify the input (which may or may not be your desired behavior). The single dash tells vim
to reads its input over standard input. Works for other commands, too.
Also, when already in Vim:
:r! diff file1 file2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With