Showing posts with label patch. Show all posts
Showing posts with label patch. Show all posts

Thursday, March 13, 2008

Reading STDIN

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 -