<?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>Conor's Blog &#187; UNIX</title>
	<atom:link href="http://blog.macaoidh.name/category/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.macaoidh.name</link>
	<description>PHP, Music, Linux</description>
	<lastBuildDate>Mon, 05 Jul 2010 13:25:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>OS X VIM Syntax Highlighting</title>
		<link>http://blog.macaoidh.name/2010/06/12/os-x-vim-syntax-highlighting/</link>
		<comments>http://blog.macaoidh.name/2010/06/12/os-x-vim-syntax-highlighting/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 09:21:43 +0000</pubDate>
		<dc:creator>Conor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[preferences]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[Syntax Highlighting]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vim highlighting]]></category>

		<guid isPermaLink="false">http://blog.macaoidh.name/?p=303</guid>
		<description><![CDATA[Syntax highlighting isn&#8217;t enabled by default on OS X, though it&#8217;s easy enough to set it up, and a few other small enhancments at the same it. Start by executing this command: cd /usr/share/vim &#38;&#38; sudo vim vimrc After entering your password press i to enter insertion mode and add the following lines after the [...]]]></description>
			<content:encoded><![CDATA[<p>Syntax highlighting isn&#8217;t enabled by default on OS X, though it&#8217;s easy enough to set it up, and a few other small enhancments at the same it.</p>
<p>Start by executing this command:</p>
<pre class="brush:bash">cd /usr/share/vim &amp;&amp; sudo vim vimrc</pre>
<p>After entering your password press <strong>i</strong> to enter insertion mode and add the following lines after the line set backspace=2:</p>
<pre class="brush:bash">
set showmatch           " automatically show matching brackets
set binary noeol        " do NOT put a carriage return at the end of the last line
set backspace=indent,eol,start  " make that backspace key work the way it should
set history=100         " keep 100 lines of history
set ruler               " show the cursor position
syntax on               " syntax highlighting
set hlsearch            " highlight the last searched term
filetype plugin on      " use the file type plugins

" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 &#038;&#038; line ("'\"") < = line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif</pre>
<p>The lines above add syntax highlighting and a few other useful things. The line <code>set binary noeol</code> is very important for web developers. For example if you are programming in PHP and you leave a space outside the closing <code>?></code> it will cause http headers to be needlessly sent. That line prevents that from happening.</p>
<p>Well that's it if you press <strong>ESC</strong> then type <strong>:wq</strong> you will return to the terminal. Try editing some files again and the highlighting should be enabled.</p>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaoidh.name/2010/06/12/os-x-vim-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mac OS X &#8211; VIM Templates</title>
		<link>http://blog.macaoidh.name/2009/12/24/mac-os-x-vim-templates/</link>
		<comments>http://blog.macaoidh.name/2009/12/24/mac-os-x-vim-templates/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 22:18:41 +0000</pubDate>
		<dc:creator>Conor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[templating system]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[with vim]]></category>

		<guid isPermaLink="false">http://blog.macaoidh.name/?p=288</guid>
		<description><![CDATA[I have always wondered if it was possible to use a template system with VIM. Whenever I used large editors it was usually because of the default template schemes they allow. I have always preferred using VIM because it&#8217;s so practical, and it&#8217;s useful to be able to execute commands in-between editing files. Well anyway [...]]]></description>
			<content:encoded><![CDATA[<p>I have always wondered if it was possible to use a template system with VIM. Whenever I used large editors it was usually because of the default template schemes they allow. I have always preferred using VIM because it&#8217;s so practical, and it&#8217;s useful to be able to execute commands in-between editing files.</p>
<p>Well anyway here are a few commands to configure a vim template system on UNIX (It should work on both OSX and Linux):</p>
<ul>
<li>Download the template system:
<pre class="brush: bash">curl -C - -O http://www.vim.org/scripts/download_script.php?src_id=3747</pre>
</li>
<li>Open VIM:
<pre class="brush: bash">sudo vim</pre>
</li>
<li>Source the file you have downloaded from within VIM by typing:
<pre class="brush: bash">:source ./download_script.php\?src_id=3747</pre>
</li>
<li>Now the VIM template system has been configured. The previous command should output the template directory so that you can create new templates, it differs depending on your OS.</li>
</ul>
<p>That&#8217;s it if you need more info on how the system works you can visit the project homepage <a href="http://www.vim.org/scripts/script.php?script_id=1172">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.macaoidh.name/2009/12/24/mac-os-x-vim-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
