<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Vim Diff</title>
	<atom:link href="http://tekrat.com/2008/02/21/vim-diff/feed/" rel="self" type="application/rss+xml" />
	<link>http://tekrat.com/2008/02/21/vim-diff/</link>
	<description></description>
	<pubDate>Thu, 18 Mar 2010 23:08:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: shire</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-6471</link>
		<dc:creator>shire</dc:creator>
		<pubDate>Thu, 14 May 2009 21:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-6471</guid>
		<description>Happy you like it Richard, although I'm not sure on vi but good luck! ;-)</description>
		<content:encoded><![CDATA[<p>Happy you like it Richard, although I&#8217;m not sure on vi but good luck! ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Lynch</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-6469</link>
		<dc:creator>Richard Lynch</dc:creator>
		<pubDate>Thu, 14 May 2009 18:04:45 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-6469</guid>
		<description>I LOVE THIS!!!

I know I'm late to the party, but I don't know how I missed this fabulous vim plugin.

I only wish it worked in plain old 'vi' which is what I use by habit.

Or maybe I can just append it to .exrc?

I'll give that a shot.

Anyway, thanks Brian for this "how did I live without it" tool!</description>
		<content:encoded><![CDATA[<p>I LOVE THIS!!!</p>
<p>I know I&#8217;m late to the party, but I don&#8217;t know how I missed this fabulous vim plugin.</p>
<p>I only wish it worked in plain old &#8216;vi&#8217; which is what I use by habit.</p>
<p>Or maybe I can just append it to .exrc?</p>
<p>I&#8217;ll give that a shot.</p>
<p>Anyway, thanks Brian for this &#8220;how did I live without it&#8221; tool!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shire</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-1473</link>
		<dc:creator>shire</dc:creator>
		<pubDate>Sat, 16 Aug 2008 02:21:45 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-1473</guid>
		<description>Due to the interest in this the new official home for this code is on GitHub!

per Greg's previous post:
http://github.com/ghewgill/vim-scmdiff/

Make changes via the GitHub interfaces (fork/pull etc), or email us!</description>
		<content:encoded><![CDATA[<p>Due to the interest in this the new official home for this code is on GitHub!</p>
<p>per Greg&#8217;s previous post:<br />
<a href="http://github.com/ghewgill/vim-scmdiff/" rel="nofollow">http://github.com/ghewgill/vim-scmdiff/</a></p>
<p>Make changes via the GitHub interfaces (fork/pull etc), or email us!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shire</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-1463</link>
		<dc:creator>shire</dc:creator>
		<pubDate>Tue, 12 Aug 2008 20:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-1463</guid>
		<description>Is there enough interest here to setup an central repro somewhere wiht a few accounts for the ppl here? (github or I can setup something on tekrat.com).  That way everyone can commit to one spot?

Has anoyone played with keeping the deleted lines present in some way?

Another change:  There's probably a better way to do this than what I have below but it seems like we should be detecting the SCM automatically as much as possible.  Something like this should at least work for detecting git/svn.

diff --git a/scmdiff.vim b/scmdiff.vim
index 4811bcf..042e8cd 100644
--- a/scmdiff.vim
+++ b/scmdiff.vim
@@ -1,7 +1,3 @@
-if !exists("g:scmDiffCommand")
-    let g:scmDiffCommand = 'git'
-endif
-
 if exists("loadedScmDiff") &#124;&#124; &amp;cp
     finish
 endif
@@ -36,6 +32,18 @@ endfunction
 
 function! s:scmDiff(...)
 
+    let cmdOut = system("git status")
+    if !exists("g:scmDiffCommand") &amp;&amp; !v:shell_error
+        let g:scmDiffCommand = 'git'
+    endif
+    let cmdOut = system("svn info")
+    if !exists("g:scmDiffCommand") &amp;&amp; !v:shell_error
+        let g:scmDiffCommand = 'svn'
+    endif
+    if !exists("g:scmDiffCommand")
+        let g:scmDiffCommand = 'git'
+    endif
+
     if exists('b:scmDiffOn') &amp;&amp; b:scmDiffOn == 1
         let b:scmDiffOn = 0
         set nodiff</description>
		<content:encoded><![CDATA[<p>Is there enough interest here to setup an central repro somewhere wiht a few accounts for the ppl here? (github or I can setup something on tekrat.com).  That way everyone can commit to one spot?</p>
<p>Has anoyone played with keeping the deleted lines present in some way?</p>
<p>Another change:  There&#8217;s probably a better way to do this than what I have below but it seems like we should be detecting the SCM automatically as much as possible.  Something like this should at least work for detecting git/svn.</p>
<p>diff &#8211;git a/scmdiff.vim b/scmdiff.vim<br />
index 4811bcf..042e8cd 100644<br />
&#8212; a/scmdiff.vim<br />
+++ b/scmdiff.vim<br />
@@ -1,7 +1,3 @@<br />
-if !exists(&#8221;g:scmDiffCommand&#8221;)<br />
-    let g:scmDiffCommand = &#8216;git&#8217;<br />
-endif<br />
-<br />
 if exists(&#8221;loadedScmDiff&#8221;) || &amp;cp<br />
     finish<br />
 endif<br />
@@ -36,6 +32,18 @@ endfunction</p>
<p> function! s:scmDiff(&#8230;)</p>
<p>+    let cmdOut = system(&#8221;git status&#8221;)<br />
+    if !exists(&#8221;g:scmDiffCommand&#8221;) &amp;&amp; !v:shell_error<br />
+        let g:scmDiffCommand = &#8216;git&#8217;<br />
+    endif<br />
+    let cmdOut = system(&#8221;svn info&#8221;)<br />
+    if !exists(&#8221;g:scmDiffCommand&#8221;) &amp;&amp; !v:shell_error<br />
+        let g:scmDiffCommand = &#8217;svn&#8217;<br />
+    endif<br />
+    if !exists(&#8221;g:scmDiffCommand&#8221;)<br />
+        let g:scmDiffCommand = &#8216;git&#8217;<br />
+    endif<br />
+<br />
     if exists(&#8217;b:scmDiffOn&#8217;) &amp;&amp; b:scmDiffOn == 1<br />
         let b:scmDiffOn = 0<br />
         set nodiff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Hewgill</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-1457</link>
		<dc:creator>Greg Hewgill</dc:creator>
		<pubDate>Sun, 10 Aug 2008 11:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-1457</guid>
		<description>I have posted an updated version at http://github.com/ghewgill/vim-scmdiff/ which avoids the "2,9999 bdelete" problem, among other improvements.</description>
		<content:encoded><![CDATA[<p>I have posted an updated version at <a href="http://github.com/ghewgill/vim-scmdiff/" rel="nofollow">http://github.com/ghewgill/vim-scmdiff/</a> which avoids the &#8220;2,9999 bdelete&#8221; problem, among other improvements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-210</link>
		<dc:creator>Lars</dc:creator>
		<pubDate>Sat, 28 Jun 2008 15:38:13 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-210</guid>
		<description>Anyone made a version that would work with multiple buffers open (not closing unrelated buffers)? I really like this script, but it's usually unusable for me when it behaves this way. I'm using MacVim BTW if that's relevant.</description>
		<content:encoded><![CDATA[<p>Anyone made a version that would work with multiple buffers open (not closing unrelated buffers)? I really like this script, but it&#8217;s usually unusable for me when it behaves this way. I&#8217;m using MacVim BTW if that&#8217;s relevant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonty</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-200</link>
		<dc:creator>Jonty</dc:creator>
		<pubDate>Fri, 28 Mar 2008 00:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-200</guid>
		<description>Aha! That'll be it, I only tested it in a single buffer instance. More fool me.</description>
		<content:encoded><![CDATA[<p>Aha! That&#8217;ll be it, I only tested it in a single buffer instance. More fool me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-199</link>
		<dc:creator>Jonas</dc:creator>
		<pubDate>Thu, 27 Mar 2008 22:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-199</guid>
		<description>7.1.138. But it might be due to the fact that I'm normally using multiple buffers, and the plugin is only run once so it won't set the variable in all buffers, AFAIK.</description>
		<content:encoded><![CDATA[<p>7.1.138. But it might be due to the fact that I&#8217;m normally using multiple buffers, and the plugin is only run once so it won&#8217;t set the variable in all buffers, AFAIK.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonty</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-198</link>
		<dc:creator>Jonty</dc:creator>
		<pubDate>Thu, 27 Mar 2008 21:04:49 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-198</guid>
		<description>Jonas, aha, now you make sense! Odd that it died for you - what version of vim are you using?

(I'll fix it in the linked version tomorrow morning)</description>
		<content:encoded><![CDATA[<p>Jonas, aha, now you make sense! Odd that it died for you - what version of vim are you using?</p>
<p>(I&#8217;ll fix it in the linked version tomorrow morning)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas</title>
		<link>http://tekrat.com/2008/02/21/vim-diff/comment-page-1/#comment-197</link>
		<dc:creator>Jonas</dc:creator>
		<pubDate>Thu, 27 Mar 2008 17:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://tekrat.com/2008/02/21/vim-diff/#comment-197</guid>
		<description>Sorry, manual diffs from (lack of) memory aren't very reliable. There are two "let b:scmDiffOn = 0" (not "= 1" as I said before), I removed the first one so there are only two places where it sets that variable. My problem was that for some reason it barfed in s:scmDiff() since that variable wasn't set (hence the if exists()).</description>
		<content:encoded><![CDATA[<p>Sorry, manual diffs from (lack of) memory aren&#8217;t very reliable. There are two &#8220;let b:scmDiffOn = 0&#8243; (not &#8220;= 1&#8243; as I said before), I removed the first one so there are only two places where it sets that variable. My problem was that for some reason it barfed in s:scmDiff() since that variable wasn&#8217;t set (hence the if exists()).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
