This is pretty basic, but it's also really useful. Vim can read standard input via a pipe at the end of any common command chain. I use Vim in conjunction with diff all the time to analyze the difference between two or more source files.
diff -u Scheduler.old.java Scheduler.java | vim -
Compare the difference of two source trees before submitting your patch:
diff -Naur oldtree newtree | vim -
Subscribe to:
Post Comments (Atom)
4 comments:
why not use vimdiff?
AFAIK, vimdiff doesn't allow you to compare by directory.
thanks a lot. its very useful
You can use vim's internal diff program which is real nice!
$ vim -d file_one.txt file_two.txt
Post a Comment