<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kate &#124; Get an Edge in Editing</title>
	<atom:link href="http://kate-editor.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://kate-editor.org</link>
	<description>The Kate Editor Homepage</description>
	<lastBuildDate>Wed, 05 Jun 2013 22:07:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>How to convert pdf to svg</title>
		<link>http://kate-editor.org/2013/06/01/how-to-convert-pdf-to-svg/</link>
		<comments>http://kate-editor.org/2013/06/01/how-to-convert-pdf-to-svg/#comments</comments>
		<pubDate>Sat, 01 Jun 2013 14:24:01 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2573</guid>
		<description><![CDATA[In a project I&#8217;m currently working on I need to display the result of TeX code. So I thought it would be nice and accurate to compile the TeX code to produce a pdf, and then use libpoppler-qt4 to draw the pdf. This works in principal, but there is a licensing problem: libpoppler is GPL, [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In a project I&#8217;m currently working on I need to display the result of TeX code. So I thought it would be nice and accurate to compile the TeX code to produce a pdf, and then use libpoppler-qt4 to draw the pdf. This works in principal, but there is a licensing problem: libpoppler is GPL, and I want to use it in a LGPL library.</p>
<p>So I searched the net and found <a title="dvipng" href="https://en.wikipedia.org/wiki/Dvipng" target="_blank">dvipng</a>, which converts a dvi file to png. It even supports transparent backgrounds. So I could convert the dvi file to png through QProcess+dvipng, and then display the png file. This works, but whenever you scale the canvas the result looks ugly since png is not a vector graphic.</p>
<p>Next, I found <a title="pdf2svg" href="http://www.cityinthesky.co.uk/opensource/pdf2svg" target="_blank">pdf2svg</a> that converts a pdf file into the scalable vector graphics format svg. In theory, I then can use <a title="QSvgRenderer" href="http://qt-project.org/doc/qt-4.8/qsvgrenderer.html" target="_blank">QSvgRenderer</a> to load and render the SVG on-the-fly using QSvgRenderer::render(QPainter*, &#8230;). So I first tested to convert the pdf to svg with this tool and then view it in InkScape. The result was perfect: InkScape renders the svg file exactly like Okular renders the pdf file:</p>
<p><img class="aligncenter size-full wp-image-2574" title="pdf2svg" src="http://kate-editor.org/wp-content/uploads/2013/06/pdf2svg.png" alt="" width="530" height="198" /></p>
<p>So I looked into the source code of pdf2svg and saw that it uses libpoppler with Cairo. This reflects an additional dependency on cairo, so I went ahead and converted the <a title="Source code of pdf2svg" href="http://www.cityinthesky.co.uk/_media/opensource/pdf2svg-0.2.1.tar.gz" target="_blank">cairo based code</a> to Qt, using libpopper-qt4. The code basically boils down to:</p>
<pre style="padding-left: 30px;">// create poppler pdf document
Poppler::Document *document = Poppler::Document::load(args[1]);
document-&gt;setRenderBackend(Poppler::Document::ArthurBackend);
document-&gt;setRenderHint(Poppler::Document::Antialiasing, true);
document-&gt;setRenderHint(Poppler::Document::TextAntialiasing, true);
document-&gt;setRenderHint(Poppler::Document::TextHinting, true);
document-&gt;setRenderHint(Poppler::Document::TextSlightHinting, true);
document-&gt;setPaperColor(Qt::transparent);</pre>
<pre style="padding-left: 30px;">// prepare QSvgGenerator as QPaintDevice
QSvgGenerator svgGenerator;
svgGenerator.setResolution(72); // resolution in dpi
svgGenerator.setFileName("out.svg");
svgGenerator.setSize(document-&gt;page(0)-&gt;pageSize());

// perform painting
QPainter painter(&amp;svgGenerator);
document-&gt;page(0)-&gt;renderToPainter(&amp;painter);
painter.end();</pre>
<p>This code does indeed generate the svg code for the pdf file. However, the result is surprisingly ugly and wrong:</p>
<p><img class="aligncenter size-full wp-image-2575" title="pdf2svg-qt4" src="http://kate-editor.org/wp-content/uploads/2013/06/pdf2svg-qt4.png" alt="" width="223" height="154" /></p>
<p>First, the pen seems too thick, and second the character &#8216;d&#8217; is wrong on the left. I&#8217;ve tried changing the resolution (setResolution()) and also the page size (setSize()) of QSvgGenerator, always getting the same result. Searching the net reveals that QSvgGenerator seems to have quite some glitches with respect to WYSIWYG rendering. I tried to use QSvgGenerator before in 2009 and came out with unusable results. Maybe I&#8217;m missing something?</p>
<p><strong>Update 1:</strong> It&#8217;s not QSvgGenerator that is to blame here. It&#8217;s indeed the Arthur backend of libpoppler. I send a patch to the poppler developers that fixes the issue with too bold glyphs. The pahts are still too inaccurate, though.</p>
<p><strong>Update2:</strong> Using <a title="dvisvgm web page" href="http://dvisvgm.sourceforge.net/" target="_blank">dvisvgm</a> with the option <a title="dvisvgm options" href="http://dvisvgm.sourceforge.net/Manpage" target="_blank">&#8211;no-fonts</a> results in an SVG file that QSvgRenderer renders correctly. So this is the current solution to get a TeX document rendered via SVG in Qt.</p>
<div class="shr-publisher-2573"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F06%2F01%2Fhow-to-convert-pdf-to-svg%2F' data-shr_title='How+to+convert+pdf+to+svg'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F06%2F01%2Fhow-to-convert-pdf-to-svg%2F' data-shr_title='How+to+convert+pdf+to+svg'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F06%2F01%2Fhow-to-convert-pdf-to-svg%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/06/01/how-to-convert-pdf-to-svg/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>A rich python console and more in Kate editor</title>
		<link>http://kate-editor.org/2013/05/31/a-rich-python-console-and-more-in-kate-editor/</link>
		<comments>http://kate-editor.org/2013/05/31/a-rich-python-console-and-more-in-kate-editor/#comments</comments>
		<pubDate>Fri, 31 May 2013 08:32:48 +0000</pubDate>
		<dc:creator>Pablo Martin</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2455</guid>
		<description><![CDATA[I have done some improvements in the plugins: python_console_ipython, python_autocomplete, python_utils, js_utils, xml_pretty and django_utils. These plugins I added a month and a half ago (except python_console_ipython) to the kate repository. I have done two improvements and a new feature: Now they work with Python2 and Python3 (except python_autocomplete, this only works with Python2, due pysmell dependence) Now [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I have done some improvements in the plugins: python_console_ipython, python_autocomplete, python_utils, js_utils, xml_pretty and django_utils. <a href="http://kate-editor.org/2013/02/18/new-plugins-to-the-kate-utils-to-python-javascript-django-and-xml/" target="_blank">These plugins</a> I added a month and a half ago (except python_console_ipython) to the kate repository. I have done two improvements and a new feature:</p>
<ul>
<li>Now they work with Python2 and <a href="http://docs.python.org/3/howto/pyporting.html" target="_blank">Python3</a> (except python_autocomplete, this only works with Python2, due <a title="pysmell" href="https://pypi.python.org/pypi/pysmell" target="_blank">pysmell</a> dependence)</li>
<li>Now they have a configuration page (except python_autocomplete, this should not have configuration parameters)</li>
</ul>
<p><a href="http://kate-editor.org/wp-content/uploads/2013/04/config.png"><img class="aligncenter  wp-image-2456" src="http://kate-editor.org/wp-content/uploads/2013/04/config.png" alt="" width="459" height="331" /></a></p>
<h6 style="text-align: center"><em>Page Config Plugins</em></h6>
<p>The new feature is the integration of the python_autocomplete and python_console_ipython plugins with the <a title="Using the projects plugin in Kate" href="http://kate-editor.org/2012/11/02/using-the-projects-plugin-in-kate/" target="_blank">project plugin</a>. The behaviour of these plugins depends of the loaded project. That is to say, the python_autocomplete plugin autocompletes with our project modules.<span style="text-align: center"> Currently the kate community is working to add a new<a href="https://git.reviewboard.kde.org/r/109326/" target="_blank"> python autocomplete</a>  using <a title="jedi" href="https://github.com/davidhalter/jedi" target="_blank">jedi</a> (this will work with Python2 and Python3).</span></p>
<p style="text-align: center"><a href="http://kate-editor.org/wp-content/uploads/2013/04/autocomplete.png"><img class="aligncenter  wp-image-2460" src="http://kate-editor.org/wp-content/uploads/2013/04/autocomplete.png" alt="" width="472" height="281" /></a></p>
<h6 style="text-align: center"><em>Python Autocomplete (with our modules)</em></h6>
<p style="text-align: left">And the python_console_ipython plugin has something that we can name the project console. A ipython shell with the python path of our project and with the environments variables that the project plugin needs.</p>
<p style="text-align: center"><a href="http://kate-editor.org/wp-content/uploads/2013/04/ipython_console.png"><img class="aligncenter  wp-image-2463" src="http://kate-editor.org/wp-content/uploads/2013/04/ipython_console.png" alt="" width="698" height="388" /></a></p>
<h6 style="text-align: center"><em>IPython Console (converted in a django shell)</em></h6>
<p style="text-align: left">To use this we need to add in the project file (.kateproject) a new attribute named &#8220;python&#8221;, with this structure:</p>
<pre> {
  "name": "MyProject",
  "files": [ { "git": 1 } ],
  "python": {
        "extraPath": ["/python/path/1",
                      "/python/path/2",
                      "/python/path/n"
        ],
        "environs": {"key": "value"},
        "version": "3.2"
    }
 }</pre>
<p>I am a django developer, as we say in <a title="Django project" href="http://www.djangoproject.com/" target="_blank">Django</a> we can come to have a <a title="django shell" href="https://docs.djangoproject.com/en/dev/intro/tutorial01/#playing-with-the-api" target="_blank">django shell</a> (python manage.py shell) integrated in our editor. But this feature is a generic feature not tied to Django. This feature can be used by other Python developers. I have added only a specific feature to the django developers. If we set in the project file (.kateproject) the attribute projectType with the value Django, the ipython shell automatically loads the models and the settings like a <a title="Django extensions" href="https://pypi.python.org/pypi/django-extensions" target="_blank">shell_plus</a> does.</p>
<pre>  {
   "name": "MyProject",
   "files": [ { "hg": 1 } ],
   "python": {
        "extraPath": ["/python/path/1",
                      "/python/path/2",
                      "/python/path/n"
        ],
        "environs": {"DJANGO_SETTINGS_MODULE": "myproject.settings"},
        "version": "2.7.3",
        "projectType": "django"
    }
  }</pre>
<p>I hope you like it <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="shr-publisher-2455"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F05%2F31%2Fa-rich-python-console-and-more-in-kate-editor%2F' data-shr_title='A+rich+python+console+and+more+in+Kate+editor'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F05%2F31%2Fa-rich-python-console-and-more-in-kate-editor%2F' data-shr_title='A+rich+python+console+and+more+in+Kate+editor'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F05%2F31%2Fa-rich-python-console-and-more-in-kate-editor%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/05/31/a-rich-python-console-and-more-in-kate-editor/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Google Summer of Code 2013</title>
		<link>http://kate-editor.org/2013/04/14/google-summer-of-code-2013/</link>
		<comments>http://kate-editor.org/2013/04/14/google-summer-of-code-2013/#comments</comments>
		<pubDate>Sun, 14 Apr 2013 09:04:30 +0000</pubDate>
		<dc:creator>Joseph Wenninger</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2515</guid>
		<description><![CDATA[If someone is interested in doing some coding for Kate-Part, Kate, KTexteditor during this years  Summer of Code, just drop a proposal at the kwrite-devel mailing list for discussion.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If someone is interested in doing some coding for Kate-Part, Kate, KTexteditor during this years  Summer of Code, just drop a proposal at the kwrite-devel mailing list for discussion.</p>
<div class="shr-publisher-2515"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F14%2Fgoogle-summer-of-code-2013%2F' data-shr_title='Google+Summer+of+Code+2013'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F14%2Fgoogle-summer-of-code-2013%2F' data-shr_title='Google+Summer+of+Code+2013'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F14%2Fgoogle-summer-of-code-2013%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/04/14/google-summer-of-code-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kate D-Bus Interfaces, used at all?</title>
		<link>http://kate-editor.org/2013/04/06/kate-d-bus-interfaces-used-at-all/</link>
		<comments>http://kate-editor.org/2013/04/06/kate-d-bus-interfaces-used-at-all/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 22:35:49 +0000</pubDate>
		<dc:creator>Christoph Cullmann</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2503</guid>
		<description><![CDATA[I just started to clean up the content of kate.git, moving things around, fixing compile warnings and similar stuff. I stumbled over warnings in our dbus interfaces. The main use of them is to allow Kate to reuse an existing instance for opening files and sessions. This part (e.g. the interface of the application object itself) works [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I just started to clean up the content of kate.git, moving things around, fixing compile warnings and similar stuff.</p>
<p>I stumbled over warnings in our dbus interfaces.</p>
<p>The main use of them is to allow Kate to reuse an existing instance for opening files and sessions. This part (e.g. the interface of the application object itself) works fine and is needed.</p>
<p>But all other interfaces, like the ones for docmanager, mainwindows, &#8230; are mostly non-existant or not implemented. I now play with the idea of just removing the nearly empty skeleton implementations, as it seems nobody missed them during the complete 4.x series.</p>
<p>Is there somebody out there that actually uses them and if, how?</p>
<div class="shr-publisher-2503"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F06%2Fkate-d-bus-interfaces-used-at-all%2F' data-shr_title='Kate+D-Bus+Interfaces%2C+used+at+all%3F'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F06%2Fkate-d-bus-interfaces-used-at-all%2F' data-shr_title='Kate+D-Bus+Interfaces%2C+used+at+all%3F'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F06%2Fkate-d-bus-interfaces-used-at-all%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/04/06/kate-d-bus-interfaces-used-at-all/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Kate: Search &amp; Replace Notifications in KDE 4.11</title>
		<link>http://kate-editor.org/2013/04/02/kate-search-replace-highlighting-in-kde-4-11/</link>
		<comments>http://kate-editor.org/2013/04/02/kate-search-replace-highlighting-in-kde-4-11/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 19:31:50 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2482</guid>
		<description><![CDATA[In KDE 4.10, the &#8220;Find All&#8221; and &#8220;Replace All&#8221; highlights all matches and at the same time shows a passive notification in a bar below the view. This bar is animated, and takes quite a lot of place in addition to the search &#38; replace bar. Since some days, Kate Part can also show passive [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In KDE 4.10, the &#8220;Find All&#8221; and &#8220;Replace All&#8221; highlights all matches and at the same time shows <a title="Kate Notifications in KDE 4.10" href="http://kate-editor.org/2012/11/06/passive-notifications-in-kate-part/">a passive notification in a bar below the view</a>. This bar is animated, and takes quite a lot of place in addition to the search &amp; replace bar.</p>
<p>Since some days, Kate Part can also show passive notifications floating in the view. Hence, we&#8217;ve changed the passive notification to appear on the bottom right as a small info message, showing the number of matches. However, in order to make this passive notification as small as possible, we removed the &#8220;Close&#8221; button, since the notification is hidden after 3 seconds anyway. Further, we removed the &#8220;Keep Highlighting&#8221; button. If you want to keep the highlights, just do not close the search &amp; replace bar. The following video demonstrates this behavior, first for KDE 4.10, then how it currently will be in KDE 4.11 (<a title="Kate: Search &amp; Replace Notifications in KDE 4.11" href="https://www.youtube.com/watch?v=7kDLd7bYJkA&amp;hd=1" target="_blank">watch the video in 720p</a>):</p>
<p style="text-align: center;"><iframe src="http://www.youtube.com/embed/7kDLd7bYJkA" frameborder="0" width="560" height="315"></iframe></p>
<div class="shr-publisher-2482"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F02%2Fkate-search-replace-highlighting-in-kde-4-11%2F' data-shr_title='Kate%3A+Search+%26+Replace+Notifications+in+KDE+4.11'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F02%2Fkate-search-replace-highlighting-in-kde-4-11%2F' data-shr_title='Kate%3A+Search+%26+Replace+Notifications+in+KDE+4.11'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F04%2F02%2Fkate-search-replace-highlighting-in-kde-4-11%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/04/02/kate-search-replace-highlighting-in-kde-4-11/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>New Text Folding in kate.git master</title>
		<link>http://kate-editor.org/2013/03/27/new-text-folding-in-kate-git-master/</link>
		<comments>http://kate-editor.org/2013/03/27/new-text-folding-in-kate-git-master/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 21:16:45 +0000</pubDate>
		<dc:creator>Christoph Cullmann</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2443</guid>
		<description><![CDATA[In the kate.git master branch the text folding is now new and shiny. In addition to be faster and less memory hungry (no folding tree is around if you fold nothing, it is only created on-demand exactly for the folded regions), the new code is less complex and smaller (and hopefully better documented + unit tested, [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In the kate.git master branch the text folding is now new and shiny.</p>
<p>In addition to be faster and less memory hungry (no folding tree is around if you fold nothing, it is only created on-demand exactly for the folded regions), the new code is less complex and smaller (and hopefully better documented + unit tested, it actually has a test for most internal operations).</p>
<p>There is actually now a clean separation, the folding does not mix with highlighting and can be used without it, too.</p>
<p>This allows for a better integration of indentation based foldings like in Python (and already fixes the most ugly miss-placements of folding regions there) and empowers the user to fold arbitrary regions manually.</p>
<p>This can be done at the moment with two kate commands (for the F7 command line):</p>
<ul>
<li>&#8220;fold&#8221; will create persistent fold for the current selection, this fold will stay until next reload of document (will implement some dfold command later, to delete it)</li>
<li>&#8220;tfold&#8221; will create temporary fold for the current selection, this fold will disappear again on unfolding</li>
</ul>
<p>This should allow better vi mode integration, too, as vi is able to fold arbitrary regions, too. (There is an internal API to fold any KTextEditor::Range you pass in, which should allow to fold by regex and other ways, too, if somebody steps up to implement it.)</p>
<p>If you find glitches, please report them as bugs and please attach some file to reproduce, I am very interested to get this all in even better shape for KDE 4.11, be folding crashs a thing of the past.</p>
<p>P.S.</p>
<p>For all people not using folding at all, be happy, it no longer will crash you (and me), as it is a nop if no folding ranges are created by the user and some extreme cases got a speedup of 1000% because of less overhead, like VERY large C++ sources <img src='http://kate-editor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="shr-publisher-2443"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F27%2Fnew-text-folding-in-kate-git-master%2F' data-shr_title='New+Text+Folding+in+kate.git+master'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F27%2Fnew-text-folding-in-kate-git-master%2F' data-shr_title='New+Text+Folding+in+kate.git+master'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F27%2Fnew-text-folding-in-kate-git-master%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/03/27/new-text-folding-in-kate-git-master/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Text Folding Reloaded</title>
		<link>http://kate-editor.org/2013/03/24/text-folding-reloaded/</link>
		<comments>http://kate-editor.org/2013/03/24/text-folding-reloaded/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 15:54:59 +0000</pubDate>
		<dc:creator>Christoph Cullmann</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2431</guid>
		<description><![CDATA[If we look at the incoming bug reports, a lot still seem to be located in our code folding implementation. The problem of the current code folding code, even after the GSoC rewrite of large parts, is that it is inter weaved with the syntax highlighting engine. During highlighting, we try to build up some tree containing [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If we look at the incoming bug reports, a lot still seem to be located in our code folding implementation.</p>
<p>The problem of the current code folding code, even after the GSoC rewrite of large parts, is that it is inter weaved with the syntax highlighting engine.</p>
<p>During highlighting, we try to build up some tree containing all folding start/ends. To accommodate languages that have indentation based folding like Python, we started to fake such starts/ends which are normally tokens like { or }. As these tree can be unbalanced and contain overlapping regions, the implementation is quiet complex.</p>
<p>Additionally, as the folding relies heavily on the syntax highlighting, which is done per document, it is impossible to have different folding per view.</p>
<p>After looking again at the code to solve some issues, it got more and more clear to me, that we need to restart that from scratch.</p>
<p>Instead of feeding the highlighting info into a tree, I started to implement text folding that just allows you to mark regions as folding ranges manually. Then internally a non-overlapping tree of ranges is created that uses our moving cursors to keep track of changes in the document. Each view will have an instance of such a tree, which allows to have folding per view.</p>
<p>These folds are only created on demand, e.g. if you decide to fold some region via selection + &#8220;fold&#8221; command. This already works quiet well in my Kate repository clone. The missing part is now the integration with the highlighting, that should use this well defined API to only create a folding region in the moment the user wants to fold it. In addition some API for the highlighters is needed to indicate that for some line there is the fold action. After that is done, I might consider to replace the current implementation with the novel one, which is btw. much easier to unit test (which is already done for most API primitives).</p>
<p>Btw., the work is done in <a title="Kate Code Folding Repository" href="http://quickgit.kde.org/?p=clones%2Fkate%2Fcullmann%2Fkate-codefolding.git" target="_blank">this</a> repository, if somebody wants to contribute, patches are welcome .P</p>
<div class="shr-publisher-2431"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F24%2Ftext-folding-reloaded%2F' data-shr_title='Text+Folding+Reloaded'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F24%2Ftext-folding-reloaded%2F' data-shr_title='Text+Folding+Reloaded'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F24%2Ftext-folding-reloaded%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/03/24/text-folding-reloaded/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Kate: New contributors, Valgrind, and a fixed bug</title>
		<link>http://kate-editor.org/2013/03/17/kate-new-contributors-valgrind-and-a-fixed-bug/</link>
		<comments>http://kate-editor.org/2013/03/17/kate-new-contributors-valgrind-and-a-fixed-bug/#comments</comments>
		<pubDate>Sun, 17 Mar 2013 19:38:49 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2409</guid>
		<description><![CDATA[In the recent months Kate saw quite some contributions from developers other than &#8220;the usual kate developers&#8221;. This is really cool, areas include more work on python plugins, a lot of bug fixing and fine tuning in the vi input mode, an improved python indenter, and more unit tests. Especially one unit test turned out [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In the recent months Kate saw quite some contributions from <a title="Kate: The Team" href="http://kate-editor.org/the-team/">developers</a> other than &#8220;the usual kate developers&#8221;. This is really cool, areas include more work on python plugins, a lot of <a title="Kate: Vi input mode" href="http://kate-editor.org/2013/03/16/kate-vim-mode-papercuts-bonus-emscripten-qt-stuff/">bug fixing and fine tuning</a> in the vi input mode, an improved python indenter, and more unit tests. Especially one unit test turned out to be immensely useful and resulted in a fix for the infamous <a title="Kate rangesForLine crash" href="https://bugs.kde.org/show_bug.cgi?id=313759" target="_blank">&#8220;rangesForLine&#8221; crash</a> (about 40 times reported). We even decided to backport this to KDE 4.10.2, so KDevelopers and Kile LaTeXers please keep an eye open on whether this has any side effects!</p>
<p>Basically, the unit test provided us with a valgrind trace. Since valgrind is a very useful tool for all developers, we&#8217;ll have a closer look at the valgrind trace:</p>
<p style="padding-left: 30px;">==10276== I<strong>nvalid read of size 4</strong><br />
==10276== at 0x62F2116: <strong>Kate::TextCursor::lineInternal()</strong> const (katetextcursor.h:134)<br />
==10276== by 0x62F9035: Kate::TextBlock::updateRange(Kate::TextRange*) (katetextblock.cpp:572)<br />
==10276== by 0x62F8C57: Kate::TextBlock::mergeBlock(Kate::TextBlock*) (katetextblock.cpp:522)<br />
==10276== by 0x62EFAA1: Kate::TextBuffer::balanceBlock(int) (katetextbuffer.cpp:494)<br />
==10276== by 0x62EF1B2: Kate::TextBuffer::unwrapLine(int) (katetextbuffer.cpp:298)<br />
==10276== by 0x637BB9C: KateBuffer::unwrapLines(int, int) (katebuffer.cpp:292)<br />
==10276== by 0x6359DE9: KateDocument::editRemoveLines(int, int) (katedocument.cpp:1321)<br />
==10276== by 0x6359AD6: KateDocument::editRemoveLine(int) (katedocument.cpp:1293)<br />
==10276== by 0&#215;6357841: KateDocument::removeLine(int) (katedocument.cpp:732)<br />
==10276== by 0x6394C6A: KateScriptDocument::removeLine(int) (katescriptdocument.cpp:513)<br />
==10276== Address 0&#215;14353470 is 96 bytes inside a block of size 152 free&#8217;d<br />
==10276== at 0x4C2A44B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)<br />
==10276== by 0x62FDE4D: <strong>Kate::TextRange::~TextRange()</strong> (katetextrange.cpp:66)<br />
==10276== by 0x6470B1E: KateOnTheFlyChecker::deleteMovingRange(KTextEditor::MovingRange*) (ontheflycheck.cpp:535)<br />
==10276== by 0&#215;6470657: KateOnTheFlyChecker::rangeEmpty(KTextEditor::MovingRange*) (ontheflycheck.cpp:489)<br />
==10276== by 0x62FE641: Kate::TextRange::checkValidity(int, int, bool) (katetextrange.cpp:196)<br />
==10276== by 0x62F6C84: Kate::TextBlock::wrapLine(KTextEditor::Cursor const&amp;) (katetextblock.cpp:168)<br />
==10276== by 0x62EEF1D: Kate::TextBuffer::wrapLine(KTextEditor::Cursor const&amp;) (katetextbuffer.cpp:231)<br />
==10276== by 0x637BA6D: KateBuffer::wrapLine(KTextEditor::Cursor const&amp;) (katebuffer.cpp:275)<br />
==10276== by 0x635972E: KateDocument::editInsertLine(int, QString const&amp;) (katedocument.cpp:1246)<br />
==10276== by 0&#215;6357690: KateDocument::insertLine(int, QString const&amp;) (katedocument.cpp:706)<br />
==10276== by 0x6394C32: KateScriptDocument::insertLine(int, QString const&amp;) (katescriptdocument.cpp:508)</p>
<p>The trace tells us that somewhere in TextCursor::lineIntern() we read a variable/address that is invalid. In fact, we are reading a pointer called m_block that should be valid. In this case, as we know the pointer should be valid, we can conclude that the entire TextCursor object is then corrupted/invalid. Since the cursor is part of a TextRange, it means the TextRange is already invalid. Interestingly, this is exactly what valgrind is telling us in the lower part: The TextRange destructor that lead to the invalid read above is called in the 2nd half of the valgrind trace. From this, we can conclude that the function KateTextBuffer::mergeBlock() accesses a dangling pointer to a TextRange.</p>
<p>That&#8217;s a good start, but in fact, this is where the hard work begins. I&#8217;ve invesed about 2 hours to find that probably the dangling pointer is in a cache that is supposed to make the access of the TextRanges (MovingRanges to be precise) faster. Christoph then looked into it and tried several attempts to fix the nasty bug, finally showing us that the cache was indeed wrong but due to a too-late fixup of the start/end text cursors with respect to the TextBlocks. In total, Christoph probably invested about 6 hours, and given that Gerald certainly took quite a lot of time too to write the unit test, we probably have more than 10 ours just to get this bug fixed. Still, the good news is that we got it! And if we are lucky, this was the last bug in  Kate&#8217;s text buffer. So on to the <a title="Kate crash list" href="https://bugs.kde.org/buglist.cgi?list_id=555342&amp;bug_severity=critical&amp;bug_severity=grave&amp;bug_severity=major&amp;bug_severity=crash&amp;query_format=advanced&amp;bug_status=UNCONFIRMED&amp;bug_status=CONFIRMED&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;product=kate" target="_blank">next crashes</a>&#8230; Help welcome!</p>
<div class="shr-publisher-2409"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F17%2Fkate-new-contributors-valgrind-and-a-fixed-bug%2F' data-shr_title='Kate%3A+New+contributors%2C+Valgrind%2C+and+a+fixed+bug'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F17%2Fkate-new-contributors-valgrind-and-a-fixed-bug%2F' data-shr_title='Kate%3A+New+contributors%2C+Valgrind%2C+and+a+fixed+bug'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F17%2Fkate-new-contributors-valgrind-and-a-fixed-bug%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/03/17/kate-new-contributors-valgrind-and-a-fixed-bug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kate Vim Mode: Papercuts (+ bonus emscripten-qt stuff!)</title>
		<link>http://kate-editor.org/2013/03/16/kate-vim-mode-papercuts-bonus-emscripten-qt-stuff/</link>
		<comments>http://kate-editor.org/2013/03/16/kate-vim-mode-papercuts-bonus-emscripten-qt-stuff/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 14:58:23 +0000</pubDate>
		<dc:creator>Simon St James</dc:creator>
				<category><![CDATA[Common]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2385</guid>
		<description><![CDATA[I was a long time Vim holdout and often wondered to myself, &#8220;just why do those nutheads use vim?&#8221; until I googled and read the blog I just linked. After trying Vim out for a few days, I was completely hooked, but didn&#8217;t want to leave KDevelop with its awesome Intellisense/ code completion/ navigation features. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I was a long time Vim holdout and often wondered to myself, &#8220;<a href="http://www.viemu.com/a-why-vi-vim.html">just why do those nutheads use vim?</a>&#8221; until I googled and read the blog I just linked.  After trying Vim out for a few days, I was completely hooked, but didn&#8217;t want to leave KDevelop with its awesome Intellisense/ code completion/ navigation features.  Thankfully, Kate has a Vim mode, so I could get the best of both worlds <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>However, I&#8217;d often run into small but jarring inconsistencies with Vim, or sometimes find missing features, and so I set about trying to fix as many as I could.  Since these were usually very small and unimportant things, I&#8217;ll just go ahead and list them, Graesslin-style <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Vim mode is one of those rare and happy pieces of code which you can very easily write tests for: just add the starting text; the list of keypresses; and the expected, final text.  Kuzmich Svyatoslav wrote a big battery of them a while back, and my <a href="https://git.reviewboard.kde.org/r/106839/">first ever patch</a> was an incredibly trivial little one that fixed a hole in the test framework and a bug that the hole obscured.</p>
<p>After that, I:</p>
<ul>
<li>Improved the test framework to enable us to test Insert Mode features;</li>
<li>Fixed the inner curly bracket text object to be more like Vim (rather than deleting everything between the curly braces on a <b>diB</b>, Vim usually attempts to leave the closing curly bracket on its own line);</li>
<li>Added <b>{</b> and <b>}</b> motions to Visual Mode;</li>
<li>Fix a few bugs with Erlend&#8217;s very handy &#8220;comma text object&#8221; extension;</li>
<li>Fixed numerous bugs with <b>t</b>/<b>T</b> and <b>,</b> &amp; <b>;</b> involving them getting &#8220;stuck&#8221; behind occurrences of the character to search for, and also made them &#8220;counted&#8221; so that one can do e.g. <b>3ta</b>, and also mirroring Vim&#8217;s behaviour where if we can&#8217;t find the required count of characters on the line, we don&#8217;t move at all;</li>
<li>Stopped the transition from Visual Mode to Normal mode from resetting the cursor position if we exited via <i>ESC</i> or <i>Ctrl-c</i>;</li>
<li>Fixed a bug with the nifty &#8220;block append&#8221; feature;</li>
<li>Fixed a nice bug with replaying the last command via <b>.</b> when the last command was an insertion that had a <i>Ctrl-o</i> in the middle of it (all the characters after we exited the <i>Ctrl-o</i> were treated as commands, with predictably zany results!)</li>
<li>Ensured that the bracket text object worked in Visual Mode;</li>
<li>Made the very handy Key Mapping feature &#8220;counted&#8221;, so you could perform your chosen Mapping several times in a row, and also made them count as one edit that could be reverted with just one request to Undo;</li>
<li>Made <b>p</b> &amp; <b>P</b> move the cursor to the end of the pasted text instead of leaving it at the beginning (whoops!), and similarly for <b>gp</b>/<b>gP</b> which places the cursor one past the end, hopefully respecting Vim&#8217;s slightly obscure exceptions and corner cases (e.g. <b>p</b> and <b>P</b> act as <b>gp</b> and <b>gp</b> when in Temporary Normal Mode);</li>
<li>When doing <i>Ctrl-o</i> in Insert Mode, move the cursor back one step if we are at the end of  the line;</li>
<li>Try to keep the length of the number under the cursor unchanged on <i>Ctrl-x</i> and <i>Ctrl-a</i> and also don&#8217;t let the cursor stray off the number;</li>
<li>Respect Vim&#8217;s rules for counting with <i>Ctrl-x</i> and <i>Ctrl-a</i>, especially with repeats;</li>
<li>Fix a lovely bug with some of the key parsing where the repeat last change command did not work after a <i>Ctrl-a</i>;</li>
<li>Made inserts (<b>i</b>, <b>I</b>, <b>a</b>, <b>A</b>, <b>o</b>, <b>O</b> and block append) counted, so you can do e.g. <b>100oHello, World!<i>&lt;ESC&gt;</i></b>, although I now see that  the old implementation of counted <b>o</b> and <b>O</b> was &#8220;by design&#8221;.  Oops &#8211; I&#8217;ll have to sort that out at some point :/;</li>
<li>Make <i>Ctrl-c</i> reset the parser so that e.g. <b>d<i>&lt;Ctrl-c&gt;</i></b> aborts the deletion.  This one was cool as it remained undetected for ages by a sheer fluke: the only visible signs were that after doing e.g. <b>d<i>&lt;Ctrl-c&gt;</i></b>, the cursor would stay at half size, and also another bug that I had been promising myself I&#8217;d investigate for a while: typing <b>r<i>&lt;Ctrl-c&gt;</i></b> would replace the current character with a nonsense character, which turned out to be the representation of the keypress <i>Ctrl-c</i>!;</li>
<li>Fixed a few minor flaws where after e.g. <b>osometext<i>&lt;ESC&gt;</i></b>, we would have to request an Undo *twice* before getting back to where we issued the command;</li>
<li>Arranged for a return to Normal Mode if we <i>Ctrl-c</i> or <i>ESC</i> when in Temporary Normal Mode.  Vim is weird, here: its behaviour is just as you would expect if you were in Normal Mode, but the status bar still claims we are in Insert Mode!</li>
<li>Fixed a bug where issuing <b>y%</b> would actually move the cursor as well as yanking the text;</li>
<li>Added the last edit markers, <b>[</b>,<b>]</b> and <b>.</b>;</li>
<li>Fixed a few bugs with inner bracket text objects being treated as invalid if there were less than three characters long;</li>
<li>Respected Vim&#8217;s rules for the <b>[[</b>, <b>][</b> etc motions when used with commands: they behave slightly differently than when they are used as cursor motions;</li>
</ul>
<p>and that&#8217;s about it! Kate Vim&#8217;s testability make it very pleasant to develop features/ fixes Test First, so all of these are buttressed by a decent amount of automated tests.</p>
<h2>The Future</h2>
<p>I&#8217;m nearing the end of the papercuts stuff, and will shortly move onto slightly larger scale things.    This will consist of implementing a Vim-style search and replace bar, with all the usual Vim shortcuts: <i>Ctrl-c</i> to dismiss; <i>Ctrl-r</i> to insert contents of register; <i>Ctrl-rCtrl-w</i> to insert the word under the cursor; etc, and with proper Vim style searching e.g. positioning the cursor on the first letter of the current match; return to where we were if cancelled;  interactive search and replace with Y/N/Q/A; etc.  I think I&#8217;ll use &#8220;smartcase&#8221; for deciding case sensitivity, but might make this configurable through a hidden config option if there is any demand for it.  </p>
<p>There&#8217;s currently quite a lot of Vim-specific code that has leaked into Kate&#8217;s own Find/ Replace dialog, and I&#8217;d really like to be able to delete that and just have Vim use this Vim-specific version.  What do people think? I&#8217;d have to get it at least as functional as Kate&#8217;s own one before I&#8217;d consider this, so we&#8217;d need e.g. some way of going through the Find and the Replace history separately (I don&#8217;t think stock Vim can do this?) and easily toggling whether this is a regex or a literal search, etc.  I&#8217;d really like some feedback on this, and a suggestion for shortcuts etc!</p>
<p>Done properly, this would give us a powerful, keyboard-friendly Find (and Command Line) dialog where we can easily track the keypresses, which would set us up nicely for  the next major task &#8211; <a href="https://bugs.kde.org/show_bug.cgi?id=288351">Vim Macro support!</a></p>
<p>Before all that, though, I just have a couple of smaller odds and ends to sort out: I need to get auto-completion properly working with <b>.</b> (currently, if auto-completion is automatically invoked, pressing <b>.</b> won&#8217;t include the completed text), and it would be nice if <i>Ctrl-p</i> and <i>Ctrl-n</i> could wrap around in the list of completions as they do in Vim (need to sort out a Kate bug with completion first).  I also have an another <a href="https://git.reviewboard.kde.org/r/109372/">idea</a> which I&#8217;d like some feedback on; it would be nice if people would try it out and let me know if they find it helpful, annoying, etc.  If only there was a way of letting people test out a patch that hasn&#8217;t been committed yet &#8230; ! Which leads nicely on to:</p>
<h2>emscripten-kate <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </h2>
<p>You may have seen my <a href="http://ssj-gz.blogspot.co.uk/2013/01/emscripten-qt-progress-faster-better.html">blogs</a> on <a href="http://vps2.etotheipiplusone.com:30176/redmine/projects/emscripten-qt/wiki/Demos">emscripten-qt</a>, a port of Qt to <a href="https://github.com/kripken/emscripten/wiki">Emscripten</a>, an awesome technology that allows one to compile C/C++ to Javascript.  This caught the eye of Mozilla, who were looking for an example of a &#8220;serious&#8221; app to go along with the games and utilities in their current list of Emscripten demos, and they kindly offered to sponsor me to work on this.  After looking through a list of candidate apps, they eventually suggested porting Kate: not exactly an easy task, as Kate obviously requires not  only a big chunk of kdelibs (with its reliance on DBUS and external processes like kded, etc) but also QtScript for its extensibility (the automatic code indentation for various programming languages, for example, is implemented in JS) meaning I&#8217;d need to get a C++-based Javascript interpreter ported to Javascript <img src='http://kate-editor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<p>This ended up being not as hard as I feared, and now we have a decent (though very cut-down; there are no plugins, so it&#8217;s more like KWrite than Kate <img src='http://kate-editor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) version of Kate ported to Javascript.  I&#8217;ve merged in the patch I&#8217;d like feedback on as mentioned above so you can easily <a href="http://vps2.etotheipiplusone.com:30176/redmine/emscripten-qt-examples/kate-testing/kate.html">try it out</a>  as long as you have a modern browser, plenty of bandwidth (even after server-side compression, you&#8217;re still looking at a tens of MB download :/) and also plenty of free RAM and CPU.  There&#8217;s an unfortunate <a href="http://code.google.com/p/chromium/issues/detail?id=180301&#038;thanks=180301&#038;ts=1362512388">bug</a> in Chrome which means you&#8217;ll need to use the <a href="http://vps2.etotheipiplusone.com:30176/redmine/emscripten-qt-examples/kate-testing/kate-noicons.html">no icons</a> version, alas. Konqueror and reKonq also do not work, to my knowledge.  Let me know what you think, and if anyone has any thoughts on shortcuts for the extended Find/ Command Line bar, do let me know!<br />
<div class="shr-publisher-2385"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F16%2Fkate-vim-mode-papercuts-bonus-emscripten-qt-stuff%2F' data-shr_title='Kate+Vim+Mode%3A+Papercuts+%28%2B+bonus+emscripten-qt+stuff%21%29'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F16%2Fkate-vim-mode-papercuts-bonus-emscripten-qt-stuff%2F' data-shr_title='Kate+Vim+Mode%3A+Papercuts+%28%2B+bonus+emscripten-qt+stuff%21%29'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F16%2Fkate-vim-mode-papercuts-bonus-emscripten-qt-stuff%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/03/16/kate-vim-mode-papercuts-bonus-emscripten-qt-stuff/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Navigation in Okular: Back &amp; Forward</title>
		<link>http://kate-editor.org/2013/03/10/navigation-in-okular-back-forward/</link>
		<comments>http://kate-editor.org/2013/03/10/navigation-in-okular-back-forward/#comments</comments>
		<pubDate>Sun, 10 Mar 2013 15:18:19 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2376</guid>
		<description><![CDATA[Okular, KDE&#8217;s universal document viewer, has a really cool feature I&#8217;m using for years already: &#8220;Go &#62; Forward&#8221; and &#8220;Go &#62; Backward&#8221;. These two actions allow to quickly jump to positions in the document where you came from in a chronological order. Consider e.g. reading the phrase &#8220;As shown in [15], &#8230;&#8221;, and you want [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a title="The official Okular homepage" href="http://okular.kde.org/" target="_blank">Okular</a>, KDE&#8217;s <a title="Okular on UserBase" href="http://userbase.kde.org/Okular" target="_blank">universal document viewer</a>, has a really cool feature I&#8217;m using for years already: &#8220;Go &gt; Forward&#8221; and &#8220;Go &gt; Backward&#8221;. These two actions allow to quickly jump to positions in the document where you came from in a chronological order. Consider e.g. reading the phrase &#8220;As shown in [15], &#8230;&#8221;, and you want to know quickly lookup reference [15]. So you click on it, and okular will jump to the list of references. And &#8220;Go &gt; Back&#8221; will bring you back to exactly the position where you came from.</p>
<p>Awesome <img src='http://kate-editor.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>In fact, I removed the &#8220;Previous&#8221; and &#8220;Next&#8221;-page buttons from the toolbar in favor of the &#8220;Back&#8221; and &#8220;Forward&#8221; feature, which is much more useful to me <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Given that my colleagues were not aware of this feature (all experts in LaTeX  and all using Kile and Okular), I thought to praise it here in a dedicated blog. <span style="text-decoration: line-through;">Interestingly, the <a title="Okular Handbook" href="http://docs.kde.org/stable/en/kdegraphics/okular/navigating.html" target="_blank">Okular Handbook</a> is missing this feature. Any takers to fix this? <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </span> <strong>Update:</strong> This is also mentioned in the <a title="Go-Menu in Okular" href="http://docs.kde.org/stable/en/kdegraphics/okular/menugo.html" target="_blank">Okular handbook</a> <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="shr-publisher-2376"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F10%2Fnavigation-in-okular-back-forward%2F' data-shr_title='Navigation+in+Okular%3A+Back+%26+Forward'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F10%2Fnavigation-in-okular-back-forward%2F' data-shr_title='Navigation+in+Okular%3A+Back+%26+Forward'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F03%2F10%2Fnavigation-in-okular-back-forward%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/03/10/navigation-in-okular-back-forward/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Idea: Code Completion for JavaScript</title>
		<link>http://kate-editor.org/2013/02/27/idea-code-completion-for-javascript/</link>
		<comments>http://kate-editor.org/2013/02/27/idea-code-completion-for-javascript/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 20:17:54 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2347</guid>
		<description><![CDATA[In 2012, Kate had a GSoC project with the aim of adding a Scripting IDE plugin. The idea was to make it easy to write Kate Part scripts (command line scripts, indenters), that should include rudimentary code completion and a gui to manage available scripts. As detailed in the blog post, a rudimentary list that showed [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In 2012, Kate had a GSoC project with the aim of adding a <a title="Scripting IDE" href="http://kate-editor.org/2012/08/29/1982/">Scripting IDE plugin</a>. The idea was to make it easy to write <a title="Scripting Kate Part" href="http://docs.kde.org/stable/en/kde-baseapps/kate/advanced-editing-tools-scripting.html">Kate Part scripts</a> (command line scripts, indenters), that should include rudimentary code completion and a gui to manage available scripts. As detailed in the blog post, a rudimentary list that showed all available scripts is available. However, due to changes in Kate Part&#8217;s scripting framework (e.g. changes in the folder structure, require() function to load libraries), the plugin in its current form is not applicable anymore. Still, the idea of having a better JavaScript support is valid.</p>
<p>So this blog post is about some ideas how we can add possibly really cool JavaScript support to Kate as a plugin. This plugin should provide the following features:</p>
<ol>
<li>provide code completion</li>
<li>support for loading additional modules (jQuery, Node.js, Prototype, Kate Scripting API, &#8230;)</li>
<li>specialized support for Kate Part scripting</li>
<li>outline in terms of a function and prototype browser</li>
</ol>
<h3>JavaScript Code Completion</h3>
<p>Providing code completion to JavaScript requires a parser so we have an abstract syntax tree (AST) of the current file. This parser needs to be error-tolerant, since during the process of programming, the source code often violates the syntax. Searching the Web, relatively few information about such a parser exists. But one tiny parser shines: <a title="Esprima" href="http://esprima.org/" target="_blank">Esprima</a> (<a title="Esprima source code" href="https://github.com/ariya/esprima" target="_blank">source code</a>, <a title="Infos about Esprima" href="http://ariya.ofilabs.com/2012/07/behind-esprima.html" target="_blank">more info</a>), written by KDE&#8217;s &#8220;very own&#8221; Ariya <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Esprima is a JavaScript parser written in JavaScript. It is (to some degree) error-tolerant and returns an <a title="Esprima Parse Demo" href="http://esprima.org/demo/parse.html" target="_blank">AST as shown in the parse demo</a>. The AST is returned in simple <a title="JSON" href="http://www.json.org/" target="_blank">JSON</a> syntax, meaning it can be easily parsed with either the <a title="JSON in JavaScript" href="http://www.json.org/js.html" target="_blank">JavaScript JSON functions</a> or <a title="JSON in Qt5" href="http://qt-project.org/wiki/Qt-5Features#080262b7904bf7cd6d839d85e0727cd1" target="_blank">JSON in Qt5</a> (<a title="QJSON (Qt4)" href="http://qjson.sourceforge.net/" target="_blank">JSON for Qt4</a>). Along the error-tolerant mode, the AST returned by Esprima also contains comments and line/column information, if desired.</p>
<p>Interestingly, the idea of using Esprima for code completion <a title="Code Completion with Esprima" href="https://code.google.com/p/esprima/issues/detail?id=130" target="_blank">arose about a year ago</a>, and meanwhile there are several projects that successfully use the Esprima AST: <a title="Esprima in Eclipse Orion" href="http://ariya.ofilabs.com/2012/07/code-editing-with-autocompletion-in-eclipse-orion.html" target="_blank">Eclipse Orion</a>, a web-based IDE, uses Esprima for <a title="Orion Code Completion" href="http://contraptionsforprogramming.blogspot.de/2012/02/better-javascript-content-assist-in.html" target="_blank">code completion</a> and for the <a title="Outline View based on Esprima" href="https://github.com/aclement/esprima-outline" target="_blank">outline view (sources)</a>. The source code for the code completion is available in the <a title="Orion IDE git" href="http://wiki.eclipse.org/Orion/Getting_the_source" target="_blank">orion client git module</a>: <a title="Esprima code" href="http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.ui/web/esprima" target="_blank">lib</a>, <a title="Esprima Code Completion (Content Assist)" href="http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.ui/web/plugins/esprima" target="_blank">code completion (content assist)</a>, <a title="Esprima unit test for code completion" href="http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima" target="_blank">unit tests</a>.</p>
<h3>So What Next?</h3>
<p>As it seems the code is all there, the next step would be to start a small standalone project and write a proof of concept to check whether this approach is feasible. I&#8217;d suggest to use Qt&#8217;s JavaScript interpreter (<a title="QtScript in Qt4" href="http://qt-project.org/doc/qt-4.8/qtscript.html" target="_blank">QtScript</a> in Qt4, <a title="QJS in Qt5" href="http://qt-project.org/doc/qt-5.0/qtqml/qtqml-module.html" target="_blank">QJS in Qt5</a>). In the long run, the goal would be to have code completion and possibly an outline view. If this works, more functionality like support for Kate Scripting could be added. So there is a lot to play around with.</p>
<p>If you are interested, just start working on it. It might be a good GSoC project (although we&#8217;d require a quite skilled developer here) <img src='http://kate-editor.org/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  Thoughts? Comments?</p>
<div class="shr-publisher-2347"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F27%2Fidea-code-completion-for-javascript%2F' data-shr_title='Idea%3A+Code+Completion+for+JavaScript'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F27%2Fidea-code-completion-for-javascript%2F' data-shr_title='Idea%3A+Code+Completion+for+JavaScript'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F27%2Fidea-code-completion-for-javascript%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/02/27/idea-code-completion-for-javascript/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Kate Git Statistics</title>
		<link>http://kate-editor.org/2013/02/27/kate-git-statistics/</link>
		<comments>http://kate-editor.org/2013/02/27/kate-git-statistics/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 19:26:43 +0000</pubDate>
		<dc:creator>Christoph Cullmann</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2349</guid>
		<description><![CDATA[Now the statistics of the kate.git are online for public viewing. They will be updated daily, located on: http://kate-editor.org/stats/ Unfortunately, the statistics of the last years are not that &#8220;representative&#8221;, as the moves of Kate around in SVN and to Git biased the statistics, as I did a lot of the commits for syncing and moving [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Now the statistics of the <a href="https://projects.kde.org/projects/kde/kde-baseapps/kate/repository" title="kate.git" target="_blank">kate.git</a> are online for public viewing.<br />
They will be updated daily, located on: <a title="Kate Git Statistics" href="http://kate-editor.org/stats/" target="_blank">http://kate-editor.org/stats/</a></p>
<p>Unfortunately, the statistics of the last years are not that &#8220;representative&#8221;, as the moves of Kate around in SVN and to Git biased the statistics, as I did a lot of the commits for syncing and moving and so on.</p>
<p>Still it is amazing how MANY people did contribute during Kate&#8217;s history! (see <a href="http://kate-editor.org/stats/authors/best_authors.html" title="Kate Authors" target="_blank">Kate Authors</a>)</p>
<p>A big THANK YOU to all contributors that appear there (and all the people that provided patches others merged in, did the testing, bug reporting, translations, &#8230;).</p>
<p>(And thanks to the authors of <a href="https://github.com/tomgi/git_stats" title="git_stats" target="_blank">git_stats</a>.)</p>
<div class="shr-publisher-2349"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F27%2Fkate-git-statistics%2F' data-shr_title='Kate+Git+Statistics'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F27%2Fkate-git-statistics%2F' data-shr_title='Kate+Git+Statistics'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F27%2Fkate-git-statistics%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/02/27/kate-git-statistics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Tools</title>
		<link>http://kate-editor.org/2013/02/25/git-tools/</link>
		<comments>http://kate-editor.org/2013/02/25/git-tools/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 19:51:11 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2288</guid>
		<description><![CDATA[The Projects plugin in Kate just gained a context menu for the tree view that shows several git tools, if available: Clicking will open the corresponding application in the correct working directory. Currently, only gitk, qgit and git-cola are supported. If you want more git integration, you probably have to use KDevelop or QtCreator]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a title="Using the Kate Projects Plugin" href="http://kate-editor.org/2012/11/02/using-the-projects-plugin-in-kate/">The Projects plugin</a> in Kate just gained a context menu for the tree view that shows several git tools, if available:</p>
<p><img class="aligncenter size-full wp-image-2289" title="Context Menu of Projects Tree View" src="http://kate-editor.org/wp-content/uploads/2013/02/git-tools.png" alt="" width="447" height="434" /></p>
<p>Clicking will open the corresponding application in the correct working directory. Currently, only <a title="gitk" href="http://www.kernel.org/pub//software/scm/git/docs/gitk.html" target="_blank">gitk</a>, <a title="qgit" href="http://sourceforge.net/projects/qgit/" target="_blank">qgit</a> and <a title="git-cola" href="http://git-cola.github.com/" target="_blank">git-cola</a> are supported. If you want more git integration, you probably have to use <a title="KDevelop" href="http://www.kdevelop.org/" target="_blank">KDevelop</a> or <a title="QtCreator" href="http://doc.qt.digia.com/qtcreator-2.4/" target="_blank">QtCreator</a> <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="shr-publisher-2288"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F25%2Fgit-tools%2F' data-shr_title='Git+Tools'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F25%2Fgit-tools%2F' data-shr_title='Git+Tools'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F25%2Fgit-tools%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/02/25/git-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New plugins to the Kate, utils to: Python, JavaScript, Django and XML</title>
		<link>http://kate-editor.org/2013/02/18/new-plugins-to-the-kate-utils-to-python-javascript-django-and-xml/</link>
		<comments>http://kate-editor.org/2013/02/18/new-plugins-to-the-kate-utils-to-python-javascript-django-and-xml/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 09:17:00 +0000</pubDate>
		<dc:creator>Pablo Martin</dc:creator>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2231</guid>
		<description><![CDATA[The project plugin in kate.git master now has four new more plugins, with many features in each one: Python (autocomplete, smart snippets, parse checker, pep8 checker and pyflakes checker), Javascript (autocompletes, jquery snippet, pretty JSON, and jslint checker), Django (smart snippets and utils to Django template) and XML (pretty xml). There are also many generic functions [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The project plugin in kate.git master now has four new more plugins, with many features in each one: <a title="Python" href="http://www.python.org/" target="_blank">Python</a> (autocomplete, smart snippets, parse checker, <a href="http://pypi.python.org/pypi/pep8" target="_blank">pep8</a> checker and <a href="http://pypi.python.org/pypi/pyflakes" target="_blank">pyflakes</a> checker), Javascript (autocompletes, jquery snippet, pretty JSON, and <a href="http://www.jslint.com/" target="_blank">jslint</a> checker), <a title="Django project" href="https://www.djangoproject.com/" target="_blank">Django</a> (smart snippets and utils to Django template) and XML (pretty xml). There are also many generic functions and generic classes in these that will be useful to the new plugins developers.</p>
<p><span id="more-2231"></span></p>
<p>I began to develop these plugins in 2009, this was <a title="Kate plugins first version" href="http://kate-editor.org/wp-content/uploads/2013/02/pyplugins.zip">my first version</a> :-). I wanted to set a shortcut to a snippet, as it was not possible (now it is posible) I started to develop these plugins to Kate.</p>
<p>In November 2011, I created a repository on <a title="Kate plugins repository" href="https://github.com/goinnn/Kate-plugins#information">github</a> to develop new features and share them. I have to thank <a href="https://github.com/ablanco" target="_blank">Alejandro Blanco</a>, <a href="https://github.com/phrearch" target="_blank">Jeroen van Veen</a>, <a href="https://github.com/javiromero" target="_blank">Javier Romero</a>, <a href="https://github.com/mborho" target="_blank">Martin Borho</a>, <a href="https://github.com/justinzane" target="_blank">Justin Chudgar</a> and <a href="http://www.yaco.es/" target="_blank">Yaco Sistemas</a> for helping me in this <a href="https://github.com/goinnn/Kate-plugins" target="_blank">project</a>.</p>
<p>In October 2012 Christoph Cullmann (Kate maintainer) sent me an e-mail, in which he asked me if I was interested to contribute with KDE project. I answered: &#8220;Of course!&#8221;&#8230;. finally I have a little time, and I have been able to integrate these plugins in the <a href="https://projects.kde.org/projects/kde/kde-baseapps/kate/repository/" target="_blank">kate.git</a></p>
<h2>Features to Python Plugin:</h2>
<ul>
<li>Python dynamic autocomplete using <a href="https://github.com/goinnn/pyplete" target="_blank">pyplete</a>, this is in beta&#8230; It requires development, but now it is very useful.</li>
<li>Smart snippets:
<ol>
<li>Insert an __init__ method into a class.</li>
<li>Insert a super call into a method.</li>
<li>Insert a call recursive into a method or into a function</li>
</ol>
</li>
<li>Simple snippet: Insert the debug instrunctions &#8220;import ipdb; ipdb.set_trace()&#8221;</li>
<li>Checkers: When you save the file it is syntax checked, <a href="http://pypi.python.org/pypi/pep8" target="_blank">pep8</a> checked and <a href="http://pypi.python.org/pypi/pyflakes" target="_blank">pyflakes</a> checked. You can invocate them any other time.</li>
</ul>
<h2><a href="http://kate-editor.org/wp-content/uploads/2013/02/autocompletion_python.jpg"><br />
</a><a href="http://kate-editor.org/wp-content/uploads/2013/02/autocompletion_python3.jpg"><img class="aligncenter size-full wp-image-2250" src="http://kate-editor.org/wp-content/uploads/2013/02/autocompletion_python3.jpg" alt="" width="1043" height="282" /></a></h2>
<p style="text-align: center">Python auto complete</p>
<h2>Features to Javascript Plugin:</h2>
<ul>
<li>JavaScript static autocomplete, using a JSON file.</li>
<li><a href="http://jquery.com/" target="_blank">JQuery</a> static autocomplete using a JSON file.</li>
<li>Pretty JSON: Pretty format of a JSON code selected</li>
<li><a href="http://www.jslint.com/" target="_blank">JSLint</a> checker: When you save the file it is JSLint checked. You can invocate it any other time.</li>
<li><a href="http://jquery.com/" target="_blank">JQuery</a> snippet, insert the ready code of the <a href="http://jquery.com/" target="_blank">jQuery</a></li>
</ul>
<h2><a href="http://kate-editor.org/wp-content/uploads/2013/02/jslint1.jpg"><img class="aligncenter size-full wp-image-2257" src="http://kate-editor.org/wp-content/uploads/2013/02/jslint1.jpg" alt="" width="763" height="324" /></a></h2>
<p style="text-align: center">JSLint checker</p>
<h2>Features to Django Plugin:</h2>
<ul>
<li>Smart snippets:
<ol>
<li>Create a model class</li>
<li>Create a form class</li>
<li>Template to the urls.py file</li>
</ol>
</li>
<li>Simple snippet: Insert the typical imports of a views.py file</li>
<li>Template Django utils
<ol>
<li>Insert the tag block/endblock. The name of the block will be the text selected</li>
<li>Close the last templatetag open</li>
</ol>
</li>
</ul>
<h2></h2>
<h2><a href="http://kate-editor.org/wp-content/uploads/2013/02/django_form1.jpg"><img class="aligncenter size-full wp-image-2262" src="http://kate-editor.org/wp-content/uploads/2013/02/django_form1.jpg" alt="" width="368" height="321" /></a></h2>
<p style="text-align: center">Create a form class</p>
<h2>Pretty XML:</h2>
<p>Pretty format of an XML code selected</p>
<h2></h2>
<h2><a href="http://kate-editor.org/wp-content/uploads/2013/02/xml_pretty1.jpg"><img class="aligncenter size-full wp-image-2264" src="http://kate-editor.org/wp-content/uploads/2013/02/xml_pretty1.jpg" alt="" width="650" height="278" /></a></h2>
<p style="text-align: center">Pretty XML</p>
<h2>Generic features:</h2>
<p>Also I have added many generic functions and generic classes, likely the more outstanding are the autocompletations. Now you can create a code completion model with very few lines:</p>
<pre>import kate
from libkatepate.autocomplete import AbstractJSONFileCodeCompletionModel, reset

class MyCodeCompletionModel(AbstractJSONFileCodeCompletionModel):

    MIMETYPES = [] # List of mimetypes E.G.: ['application/javascript', 'text/html']
    TITLE_AUTOCOMPLETION = "My Auto Completion Model"
    FILE_PATH = 'my_autocompletion.json'
    # Operators to separate the instrunctions
    OPERATORS = ["=", " ", "[", "]", "(", ")", "{", "}", ":", "&gt;", "&lt;",
                 "+", "-", "*", "/", "%", " &amp;&amp; ", " || ", ","]

@kate.init
@kate.viewCreated
def createSignalAutocompleteJS(view=None, *args, **kwargs):
    view = view or kate.activeView()
    cci = view.codeCompletionInterface()
    cci.registerCompletionModel(my_code_completion_model)

my_code_completion_model = MyCodeCompletionModel(kate.application)
my_code_completion_model.modelReset.connect(reset)</pre>
<p>The my_autocompletion.json file should have this format:</p>
<pre>  {
    "xxx": {
      "category": "module",
      "children": {
        "www": {
          "category": "class",
          "children": {}
        },
        "yyy": {
          "category": "constant",
          "children": {}
        },
        "zzz": {
          "category": "function",
          "args": "(x1, x2, x3)",
          "children": {}
        }
      }
    }
  }</pre>
<p>I encourage you to participate in the KDE project, for me this participation has been very simple because this community is very, very open.</p>
<p>Thanks all,</p>
<div class="shr-publisher-2231"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F18%2Fnew-plugins-to-the-kate-utils-to-python-javascript-django-and-xml%2F' data-shr_title='New+plugins+to+the+Kate%2C+utils+to%3A+Python%2C+JavaScript%2C+Django+and+XML'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F18%2Fnew-plugins-to-the-kate-utils-to-python-javascript-django-and-xml%2F' data-shr_title='New+plugins+to+the+Kate%2C+utils+to%3A+Python%2C+JavaScript%2C+Django+and+XML'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F18%2Fnew-plugins-to-the-kate-utils-to-python-javascript-django-and-xml%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/02/18/new-plugins-to-the-kate-utils-to-python-javascript-django-and-xml/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Highlight Text Selection Plugin</title>
		<link>http://kate-editor.org/2013/02/15/highlight-text-selection-plugin/</link>
		<comments>http://kate-editor.org/2013/02/15/highlight-text-selection-plugin/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 08:42:18 +0000</pubDate>
		<dc:creator>Dominik</dc:creator>
				<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2274</guid>
		<description><![CDATA[As a quick notice: The highlight selection plugin was not removed in KDE SC 4.10.0. Instead, a silly bug results in not loading the plugin. This is fixed for DKE 4.10.1. If you cannot wait, you can find a workaround here]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As a quick notice: The <a title="Highlight Selected Text" href="http://kate-editor.org/2010/11/14/highlight-selected-text/">highlight selection plugin</a> was not removed in KDE SC 4.10.0. Instead, a silly bug results in not loading the plugin. This is fixed for DKE 4.10.1. If you cannot wait, you can find a <a title="Bug report: Highlight Selected Text is missing" href="https://bugs.kde.org/show_bug.cgi?id=314530" target="_blank">workaround here</a> <img src='http://kate-editor.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="shr-publisher-2274"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F15%2Fhighlight-text-selection-plugin%2F' data-shr_title='Highlight+Text+Selection+Plugin'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F15%2Fhighlight-text-selection-plugin%2F' data-shr_title='Highlight+Text+Selection+Plugin'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F15%2Fhighlight-text-selection-plugin%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/02/15/highlight-text-selection-plugin/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Kate Project Plugin News &#8211; Code Analysis</title>
		<link>http://kate-editor.org/2013/02/02/kate-project-plugin-news-code-analysis/</link>
		<comments>http://kate-editor.org/2013/02/02/kate-project-plugin-news-code-analysis/#comments</comments>
		<pubDate>Sat, 02 Feb 2013 20:28:58 +0000</pubDate>
		<dc:creator>Christoph Cullmann</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Users]]></category>
		<category><![CDATA[planet]]></category>

		<guid isPermaLink="false">http://kate-editor.org/?p=2216</guid>
		<description><![CDATA[The project plugin in kate.git master has now the ability to call cppcheck. This is just hacked in at the moment and needs more love, but it works. Feel free to contribute integration of other code checkers, cppcheck is only the first, I hope]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The project plugin in kate.git master has now the ability to call <a title="cppcheck" href="http://cppcheck.sourceforge.net/" target="_blank">cppcheck</a>.</p>
<p>This is just hacked in at the moment and needs more love, but it works.<br />
Feel free to contribute integration of other code checkers, cppcheck is only the first, I hope <img src='http://kate-editor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://kate-editor.org/wp-content/uploads/2013/02/kate_project_code_analysis.png"><img class="aligncenter size-large wp-image-2218" title="kate_project_code_analysis" src="http://kate-editor.org/wp-content/uploads/2013/02/kate_project_code_analysis-1024x586.png" alt="" width="770" height="440" /></a></p>
<div class="shr-publisher-2216"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F02%2Fkate-project-plugin-news-code-analysis%2F' data-shr_title='Kate+Project+Plugin+News+-+Code+Analysis'></a><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F02%2Fkate-project-plugin-news-code-analysis%2F' data-shr_title='Kate+Project+Plugin+News+-+Code+Analysis'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fkate-editor.org%2F2013%2F02%2F02%2Fkate-project-plugin-news-code-analysis%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://kate-editor.org/2013/02/02/kate-project-plugin-news-code-analysis/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
