<?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>Ole Bakstad&#039;s blog &#187; indent</title>
	<atom:link href="http://dibon.net/wordpress/tag/indent/feed/" rel="self" type="application/rss+xml" />
	<link>http://dibon.net/wordpress</link>
	<description>About stuff that happens, when it happens, if it happens.</description>
	<lastBuildDate>Mon, 15 Jun 2009 20:08:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Auto brackets and indent in VIM</title>
		<link>http://dibon.net/wordpress/auto-brackets-and-indent-in-vim/</link>
		<comments>http://dibon.net/wordpress/auto-brackets-and-indent-in-vim/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 23:36:28 +0000</pubDate>
		<dc:creator>Ole Bakstad</dc:creator>
				<category><![CDATA[Tips & Hints]]></category>
		<category><![CDATA[indent]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://dibon.net/wordpress/?p=37</guid>
		<description><![CDATA[As I mentioned in post gedit + plugins = \o/ you can make gedit auto complete {}, insert proper indentation and place the cursor in the right position. I have recently moved on to using VIM. Of course I want the same functionality, and therefore had to make this happen! Here is what you do: [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in post <a href="http://dibon.net/wordpress/gedit-plugins-o/">gedit + plugins = \o/</a> you can make gedit auto complete {}, insert proper indentation and place the cursor in the right position.</p>
<p>I have recently moved on to using VIM. Of course I want the same functionality, and therefore had to make this happen!</p>
<p>Here is what you do:</p>
<p>In your ~/.vimrc put:</p>
<p><code>set autoindent<br />
inoremap {&lt;CR&gt; {&lt;CR&gt;}&lt;Esc&gt;O&lt;Tab&gt;</code></p>
<p>Enjoy!</p>
<p><strong>Edit:</strong><br />
If you want auto completion for &#8220;([])&#8221; etc. you might want to check out <a href="http://www.vim.org/scripts/script.php?script_id=1849">autoclose.vim</a>!</p>
<p><strong>Edit 2:<br />
</strong>If you want the automatic indentation inside {} while using autoclose.vim you need to remove &#8220;{&#8220;,&#8221;}&#8221; from the source.</p>
<p>Line 148 then look like:</p>
<p><code>let s:charsToClose = {'(': ')', '[': ']', '"': '"', "'": "'"}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dibon.net/wordpress/auto-brackets-and-indent-in-vim/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

