[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Kate and diff
From:       g <g () miernicki ! com>
Date:       2009-01-28 22:41:36
Message-ID: 5d9043b70901281441o42062e9v8505072da5e98c6d () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I've given kompare a try and its miles better than the older windows apps I
was using in the past. For now I think I'm going use this to solve my short
term problem of code comparisons.

I was also about to try out Dominik's suggestions but noticed that Kate
3.1.3 already had the external tool options to compare against CVS. The
script uses Kompare to do a diff on the changes you have made to a file from
a local CVS store. This would be more useful if there were options to
actually set which repository it was comparing against I suppose, but
perhaps may kome in handy.

cheers,
g

On Tue, Jan 27, 2009 at 17:49, Dominik Haumann <dhdev@gmx.de> wrote:

> On Tuesday 27 January 2009, Ivo Anjo wrote:
> > On Tue, Jan 27, 2009 at 9:36 PM, g <g@miernicki.com> wrote:
> > > I'd like to know whether or not Kate supports diff viewing. As far as I
> > > can tell, Kate can switch into a two column mode displaying two
> > > separate documents side by side. However, I cannot seem to be able to
> > > figure out how to compare the differences between the two document
> > > (inline) as if they were different versions of the same document. I was
> > > thinking that there would perhaps be a plugin to accomodate this
> > > feature but tirelessly googling this concept with no sign of one has
> > > made me give up this approach and hence why I am posting to this list.
> > >
> > > regards,
> > > g
>
> > I think there are two other kde apps (kompare and kdiff3) that allow you
> > to do this, but inside kate I don't think there's any support for that.
> > The only think that kate supports is highlighting diff files.
> >
> > But some way to compare and edit files inside kate would be nice, as
> > other diff tools that I know of do not provide or have awkward editors.
>
> There is at least a little support for it via the external tools if you
> diff to Subversion or CVS.
> I'm doing the following in KDE3:
> - Settings > Configure Kate > Kate > Plugins
>  Enable [x] External Tools plugin
> - Click on the settings page for external tools
> - Create a new item called "View Diff to CVS/SVN"
> - Insert the following bash code:
> #------------------
> cd %directory
> if [ -d .svn ] && grep %filename .svn/entries 2>&1 >/dev/null ; then
>  svn diff %filename|kompare -o -
> elif [ -d CVS ] && grep %filename CVS/Entries 2>&1 >/dev/null ; then
>  cvs diff -ub %filename|kompare -o -
> else
>  kdialog --title Error --msgbox "The file '%filename' is not in SVN or
> CVS."
> fi
> #------------------
> - Set Executable to: svn
> - Set Save to "Current Document"
> - Ok and Apply
>
> Now add a shortcut for the new action: Settings > Configure Shortcuts.
>
> Now you can make a diff by using the shortcut. Very handy, I use it
> almost everyday.
>
> This works perfectly in KDE3. Maybe in KDE4 it does not work. If so,
> the plugin is not yet "ported enough" - unfortunately.
>
> Maybe this helps.
> Dominik
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
>

[Attachment #5 (text/html)]

I&#39;ve given kompare a try and its miles better than the older windows
apps I was using in the past. For now I think I&#39;m going use this to
solve my short term problem of code comparisons. <br><br>I was also about to try out \
Dominik&#39;s suggestions but noticed that Kate 3.1.3 already had the external tool \
options to compare against CVS. The script uses Kompare to do a diff on the changes \
you have made to a file from a local CVS store. This would be more useful if there \
were options to actually set which repository it was comparing against I suppose, but \
perhaps may kome in handy.<br> <br>cheers,<br>g<br><br><div class="gmail_quote">On \
Tue, Jan 27, 2009 at 17:49, Dominik Haumann <span dir="ltr">&lt;<a \
href="mailto:dhdev@gmx.de">dhdev@gmx.de</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On Tuesday 27 January 2009, Ivo \
Anjo wrote:<br> &gt; On Tue, Jan 27, 2009 at 9:36 PM, g &lt;<a \
href="mailto:g@miernicki.com">g@miernicki.com</a>&gt; wrote:<br> &gt; &gt; I&#39;d \
like to know whether or not Kate supports diff viewing. As far as I<br> &gt; &gt; can \
tell, Kate can switch into a two column mode displaying two<br> &gt; &gt; separate \
documents side by side. However, I cannot seem to be able to<br> &gt; &gt; figure out \
how to compare the differences between the two document<br> &gt; &gt; (inline) as if \
they were different versions of the same document. I was<br> &gt; &gt; thinking that \
there would perhaps be a plugin to accomodate this<br> &gt; &gt; feature but \
tirelessly googling this concept with no sign of one has<br> &gt; &gt; made me give \
up this approach and hence why I am posting to this list.<br> &gt; &gt;<br>
&gt; &gt; regards,<br>
&gt; &gt; g<br>
<br>
</div><div class="Ih2E3d">&gt; I think there are two other kde apps (kompare and \
kdiff3) that allow you<br> &gt; to do this, but inside kate I don&#39;t think \
there&#39;s any support for that.<br> &gt; The only think that kate supports is \
highlighting diff files.<br> &gt;<br>
&gt; But some way to compare and edit files inside kate would be nice, as<br>
&gt; other diff tools that I know of do not provide or have awkward editors.<br>
<br>
</div>There is at least a little support for it via the external tools if you<br>
diff to Subversion or CVS.<br>
I&#39;m doing the following in KDE3:<br>
- Settings &gt; Configure Kate &gt; Kate &gt; Plugins<br>
 &nbsp;Enable [x] External Tools plugin<br>
- Click on the settings page for external tools<br>
- Create a new item called &quot;View Diff to CVS/SVN&quot;<br>
- Insert the following bash code:<br>
#------------------<br>
cd %directory<br>
if [ -d .svn ] &amp;&amp; grep %filename .svn/entries 2&gt;&amp;1 &gt;/dev/null ; \
then<br>  &nbsp;svn diff %filename|kompare -o -<br>
elif [ -d CVS ] &amp;&amp; grep %filename CVS/Entries 2&gt;&amp;1 &gt;/dev/null ; \
then<br>  &nbsp;cvs diff -ub %filename|kompare -o -<br>
else<br>
 &nbsp;kdialog --title Error --msgbox &quot;The file &#39;%filename&#39; is not in \
SVN or CVS.&quot;<br> fi<br>
#------------------<br>
- Set Executable to: svn<br>
- Set Save to &quot;Current Document&quot;<br>
- Ok and Apply<br>
<br>
Now add a shortcut for the new action: Settings &gt; Configure Shortcuts.<br>
<br>
Now you can make a diff by using the shortcut. Very handy, I use it<br>
almost everyday.<br>
<br>
This works perfectly in KDE3. Maybe in KDE4 it does not work. If so,<br>
the plugin is not yet &quot;ported enough&quot; - unfortunately.<br>
<br>
Maybe this helps.<br>
<font color="#888888">Dominik<br>
</font><div><div></div><div \
class="Wj3C7c">_______________________________________________<br> KWrite-Devel \
mailing list<br> <a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> \
</div></div></blockquote></div><br>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic