<?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>LAMBDAPHONE &#187; blog</title>
	<atom:link href="http://coder.bsimmons.name/blog/tag/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://coder.bsimmons.name/blog</link>
	<description>fragmentary ideas  ䷿  intellectual what-nots  ䷷  and haskell programming  ䷴</description>
	<lastBuildDate>Sun, 29 Jan 2012 17:24:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Code Highlighting in WordPress using Vim &amp; Yankcode</title>
		<link>http://coder.bsimmons.name/blog/2009/04/code-highlighting-in-wordpress-using-vim-yankcode/</link>
		<comments>http://coder.bsimmons.name/blog/2009/04/code-highlighting-in-wordpress-using-vim-yankcode/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 06:53:50 +0000</pubDate>
		<dc:creator>jberryman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://coder.bsimmons.name/blog/?p=58</guid>
		<description><![CDATA[<p>After looking through a bunch of wordpress plugins that weren&#8217;t doing it for me, this is the scheme I came up with to get code syntax highlighting working for my blog. You can easily paste code into wordpress which should&#8230; <a href="http://coder.bsimmons.name/blog/2009/04/code-highlighting-in-wordpress-using-vim-yankcode/" class="read_more">   [ R E A D &#124; M O R E ]</a></p>]]></description>
			<content:encoded><![CDATA[<p>After looking through a bunch of wordpress plugins that weren&#8217;t doing it for me, this is the scheme I came up with to get code syntax highlighting working for my blog. You can easily paste code into wordpress which should closely resemble the way it is highlighted in Vim:</p>
<p>First download the <a href="http://www.vim.org/scripts/script.php?script_id=1818" target="_blank">Yankcode vim plugin</a>, written by Sheng Yang and (per the instructions on his <a href="http://www.yasker.org/en/blog/a-vim-script-for-pasting-syntax-code-to-webpage-33" target="_blank">blog</a>) open up a big source file that contains all the different syntax elements you will want to style (e.g. comments, operators, etc.). Then use vim&#8217;s builtin <code>TOhtml</code> function to output an html file that we will extract our style sheet from. In Vim:</p>
<blockquote>
<pre>
:let html_use_css=1
:TOhtml
:w keepOnlyTheCss.html</pre>
</blockquote>
<p>Follow the instructions from the linked blog on how to extract the CSS. You can remove the background-color elements and change anything that you like. Add the CSS rules to the end of your &#8216;style.css&#8217; file in your theme&#8217;s directory. Now you can insert code into your blog by highlighting the code in Vim, entering &#8216;<code>:Yankcode</code>&#8216; and pasting it into WordPress with ctrl-v.</p>
<p>One more thing: wordpress will mangle your double quotes and <code>--</code> so I installed the <a href="http://wordpress.org/extend/plugins/raw-html/" target="_blank">Raw HTML plugin</a> for WordPress and modified the Yankcode vim plugin so that it wraps the blockquotes in Raw HTML&#8217;s special comments, which disable wordpress&#8217;s special formatting. </p>
<p>And here is an example!:<br />
<blockquote class="vimblock">
<span class="lnr">607 </span><span class="Comment">---maybe export:</span><br>
<span class="lnr">608 </span>cond&nbsp;<span class="Operator">::</span>&nbsp;a&nbsp;<span class="Operator">-&gt;</span>&nbsp;a&nbsp;<span class="Operator">-&gt;</span>&nbsp;<span class="Type">Bool</span>&nbsp;<span class="Operator">-&gt;</span>&nbsp;a<br>
<span class="lnr">609 </span>cond&nbsp;x&nbsp;y&nbsp;b&nbsp;<span class="Operator">=</span>&nbsp;<span class="Conditional">if</span>&nbsp;b&nbsp;<span class="Conditional">then</span>&nbsp;x&nbsp;<span class="Conditional">else</span>&nbsp;y<br>
</blockquote></p>
]]></content:encoded>
			<wfw:commentRss>http://coder.bsimmons.name/blog/2009/04/code-highlighting-in-wordpress-using-vim-yankcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Hello world!&#8221; :: String</title>
		<link>http://coder.bsimmons.name/blog/2009/03/hello-world/</link>
		<comments>http://coder.bsimmons.name/blog/2009/03/hello-world/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 03:24:40 +0000</pubDate>
		<dc:creator>jberryman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://coder.bsimmons.name/blog/?p=1</guid>
		<description><![CDATA[<p>This will be a blog about programming, mostly in the functional programming language <a href="http://en.wikipedia.org/wiki/Haskell_(programming_language)" target="_blank">Haskell</a>. I&#8217;m starting it to publish my projects and experiments that I think others might find interesting. My goal is to express ideas clearly, and&#8230; <a href="http://coder.bsimmons.name/blog/2009/03/hello-world/" class="read_more">   [ R E A D &#124; M O R E ]</a></p>]]></description>
			<content:encoded><![CDATA[<p>This will be a blog about programming, mostly in the functional programming language <a href="http://en.wikipedia.org/wiki/Haskell_(programming_language)" target="_blank">Haskell</a>. I&#8217;m starting it to publish my projects and experiments that I think others might find interesting. My goal is to express ideas clearly, and in a way that takes as little of my reader&#8217;s time as possible. I hope that I learn a lot from my readers in the process!</p>
<p>I am running a wordpress blog, using the fine Vostok theme created by <a xml:lang="es" hreflang="es" href="http://www.programavostok.com/en/">Javier Cañada</a> and <a xml:lang="en" hreflang="en" href="http://www.rubenlozano.com/">Rubén Lozano</a>, which can be downloaded <a href="http://www.vostoktheme.com/" target="_blank">here</a>. Those guys also have a nice <a href="http://www.vostok.es/blog/" target="_blank">blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://coder.bsimmons.name/blog/2009/03/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk
Database Caching 1/15 queries in 0.020 seconds using disk

Served from: coder.bsimmons.name @ 2012-02-05 11:00:52 -->
