<?xml version="1.0"?>
<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/"
	>
   <channel>
      <pubDate>Thu, 4 Dec 2008 03:34:12 GMT</pubDate>
      <lastBuildDate>Thu, 4 Dec 2008 03:34:12 GMT</lastBuildDate>
      <language>en</language>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <title>CrunchBang ~ gedit</title>
      <link>http://crunchbang.org/tags/gedit/</link>
      <description>Code, Design &amp; GNU/Linux</description>

<item>
    <title>gedit todo Hack</title>
    <link>http://crunchbang.org/archives/2007/09/25/gedit-todo-hack/</link>
    <pubDate>Tue, 25 Sep 2007 07:28:55 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/09/25/gedit-todo-hack/</guid>
    <description><![CDATA[
    <p><strong>UPDATE &#8212; Sun 21 Oct 2007</strong><br />
<em>This works for Feisty but not Gutsy. I&#39;ll update this hack for Gutsy when I get time.</em></p>

<p>I&#39;m not sure if anyone will find this little hack useful but I thought I&#39;d post about it anyhow. Basically, I have always kept my to-do list in a simple text file on my desktop. Each new to-do item gets put on its own line in the file and I mark the beginning of each line with an indicator to show whether the item is waiting to be done [-], been done [#]or been canceled [;].</p>

<p>An example of this might look like:</p>

<pre><code>/*
 * stuff to do and stuff that's already been done
 */
- complete report for Mr Smith
- take dog for walk
# blog about todo hack
; fly to the moon
# buy milk
# etc etc
</code></pre>

<p>Keeping my to-do list in this fashion has worked great for years and my current to-do list is a couple of thousand lines long. The only problem with my to-do list is it can be hard to read and scan. Enter my <a href="http://www.gnome.org/projects/gedit/ " title="Find out more about gedit.">gedit</a> hack.</p>

<p>gedit is GNOME&#39;s default text editor and I use it to edit my to-do list. One of gedit&#39;s great features [<em>it has many more</em>] is its ability to do syntax highlighting. My hack basically involves creating a new language file so that gedit will be able to highlight my to-do items differently depending on their status. Simply follow the instructions below to recreate the hack:</p>

<p>Enter the following command in your terminal:</p>

<pre><code>sudo gedit /usr/share/gtksourceview-1.0/language-specs/todo.lang
</code></pre>

<p>Now copy &amp; paste the following lines into the file before saving and closing gedit:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE language SYSTEM "language.dtd"&gt;
&lt;language _name="TODO" version="1.0" _section="Others" mimetypes="text/plain"&gt;

    &lt;block-comment _name = "Header" style = "Header"&gt;
        &lt;start-regex&gt;/*&lt;/start-regex&gt;
            &lt;end-regex&gt;*/&lt;/end-regex&gt;
    &lt;/block-comment&gt;

    &lt;line-comment _name = "Uncomplete" style= "To do"&gt;
        &lt;start-regex&gt;-&lt;/start-regex&gt;
    &lt;/line-comment&gt;

    &lt;line-comment _name = "Complete" style= "Complete"&gt;
        &lt;start-regex&gt;#&lt;/start-regex&gt;
    &lt;/line-comment&gt;

    &lt;line-comment _name = "Cancelled" style= "Cancelled"&gt;
        &lt;start-regex&gt;;&lt;/start-regex&gt;
    &lt;/line-comment&gt;

&lt;/language&gt;
</code></pre>

<p>Now restart gedit and create a new to-do list file using the syntax shown in my example above. Then from gedit&#39;s menu go:</p>

<pre><code>View -&gt; Highlight Mode -&gt; Others -&gt; TODO
</code></pre>

<p>And finally, edit how you would like the highlighting to look. Again, from gedit&#39;s menu go:</p>

<pre><code>Edit -&gt; Preferences -&gt; Syntax Highlighting
</code></pre>

<p>Once you have completed these steps you should have a nice syntax highlighted to-do file. See my example below:</p>

<p><span style="outline:4px solid #babdb6;"><img src="http://crunchbang.org/uploads/093007064832-todo-list.png" alt="Screen grab of sample to-do list." /></span></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/gedit/" title="Browse all posts tagged with &#8220;gedit&#8221;">gedit</a>, <a href="http://crunchbang.org/tags/hacks/" title="Browse all posts tagged with &#8220;hacks&#8221;">hacks</a>, <a href="http://crunchbang.org/tags/linux/" title="Browse all posts tagged with &#8220;linux&#8221;">linux</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

 </channel>
</rss>