<?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>Martin Ankerl &#187; erlang</title> <atom:link href="http://martin.ankerl.com/category/erlang/feed/" rel="self" type="application/rss+xml" /><link>http://martin.ankerl.com</link> <description>Chunky bacon!!</description> <lastBuildDate>Sat, 04 Feb 2012 10:18:10 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Erlang Syntax Highlighting</title><link>http://martin.ankerl.com/2007/05/06/erlang-syntax-highlighting/</link> <comments>http://martin.ankerl.com/2007/05/06/erlang-syntax-highlighting/#comments</comments> <pubDate>Sun, 06 May 2007 18:55:47 +0000</pubDate> <dc:creator>martinus</dc:creator> <category><![CDATA[coding]]></category> <category><![CDATA[erlang]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[news]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[tricks]]></category> <category><![CDATA[editor]]></category> <category><![CDATA[gedit]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[syntax highlighting]]></category><guid isPermaLink="false">http://martin.ankerl.com/?p=88</guid> <description><![CDATA[I have written a language definition file for GtkSourceView to get a nice syntax highlighting for Erlang with applications that use this component, e.g. Gnome&#8217;s standard editor gedit. The highlighting looks like this: Here is how to get this to &#8230; <a href="http://martin.ankerl.com/2007/05/06/erlang-syntax-highlighting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I have written a language definition file for <a href="http://gtksourceview.sourceforge.net/">GtkSourceView</a> to get a nice syntax highlighting for <a href="http://www.erlang.org/">Erlang</a> with applications that use this component, e.g. Gnome&#8217;s standard editor <a href="http://www.gnome.org/projects/gedit/">gedit</a>.</p><p>The highlighting looks like this:<br /><center><br /> <img src="/files/erlang-gedit.png?9d7bd4" alt="Screenshot gedit with Erlang sourcecode" width="420" height="322" /><br /></center></p><p>Here is how to get this to work:<br /> <span id="more-88"></span></p><h1>Install Erlang Language File</h1><ol><li>Download the file <a href="/files/erlang.lang">erlang.lang</a>.</li><li>Copy the file to <tt>/usr/share/gtksourceview-1.0/language-specs/erlang.lang</tt>.</li><li>Start gedit, open an Erlang file, and choose <tt>View</tt> &gt; <tt>Highlight Mode</tt> &gt; <tt>Sources</tt> &gt; <tt>Erlang</tt>.</ol><h1>Automatically Recognize *.erl</h1><p>If you want gedit to automatically recognize that all <tt>.erl</tt> files should be correctly highlighted, you have to define the mime type (more info is <a href="http://zerokspot.com/node/35">here</a>):</p><ol><li>Create directory to override mime types, in the command line type<pre>mkdirhier ~/.local/share/mime/packages</pre></li><li>Download the custom mime file <a href="/files/Override.xml">Override.xml</a> into this directory (if the file already exists, you have to copy the relevant lines by hand):<pre>cd ~/.local/share/mime/packages
wget http://martin.ankerl.com/files/Override.xml</pre></li><li>Update the mime database by merging the file:<pre>update-mime-database ~/.local/share/mime</pre></li><li>Restart nautilus (or logout &#038; login again):<pre>killall nautilus</pre></li></ol><p>There you go, Erlang code in all its glory. Happy hacking!</p><div style='clear:both'></div>]]></content:encoded> <wfw:commentRss>http://martin.ankerl.com/2007/05/06/erlang-syntax-highlighting/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/10 queries in 0.106 seconds using disk: basic
Object Caching 417/434 objects using disk: basic

Served from: martin.ankerl.com @ 2012-02-04 11:43:21 -->
