[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'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. <br><br>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.<br> <br>cheers,<br>g<br><br><div class="gmail_quote">On \
Tue, Jan 27, 2009 at 17:49, Dominik Haumann <span dir="ltr"><<a \
href="mailto:dhdev@gmx.de">dhdev@gmx.de</a>></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> > On Tue, Jan 27, 2009 at 9:36 PM, g <<a \
href="mailto:g@miernicki.com">g@miernicki.com</a>> wrote:<br> > > I'd \
like to know whether or not Kate supports diff viewing. As far as I<br> > > can \
tell, Kate can switch into a two column mode displaying two<br> > > separate \
documents side by side. However, I cannot seem to be able to<br> > > figure out \
how to compare the differences between the two document<br> > > (inline) as if \
they were different versions of the same document. I was<br> > > thinking that \
there would perhaps be a plugin to accomodate this<br> > > feature but \
tirelessly googling this concept with no sign of one has<br> > > made me give \
up this approach and hence why I am posting to this list.<br> > ><br>
> > regards,<br>
> > g<br>
<br>
</div><div class="Ih2E3d">> I think there are two other kde apps (kompare and \
kdiff3) that allow you<br> > to do this, but inside kate I don't think \
there's any support for that.<br> > The only think that kate supports is \
highlighting diff files.<br> ><br>
> But some way to compare and edit files inside kate would be nice, as<br>
> 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'm doing the following in KDE3:<br>
- Settings > Configure Kate > Kate > Plugins<br>
Enable [x] External Tools plugin<br>
- Click on the settings page for external tools<br>
- Create a new item called "View Diff to CVS/SVN"<br>
- Insert the following bash code:<br>
#------------------<br>
cd %directory<br>
if [ -d .svn ] && grep %filename .svn/entries 2>&1 >/dev/null ; \
then<br> svn diff %filename|kompare -o -<br>
elif [ -d CVS ] && grep %filename CVS/Entries 2>&1 >/dev/null ; \
then<br> cvs diff -ub %filename|kompare -o -<br>
else<br>
kdialog --title Error --msgbox "The file '%filename' is not in \
SVN or CVS."<br> fi<br>
#------------------<br>
- Set Executable to: svn<br>
- Set Save to "Current Document"<br>
- Ok and Apply<br>
<br>
Now add a shortcut for the new action: Settings > 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 "ported enough" - 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