<?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>Basildon Coder &#187; Vim</title>
	<atom:link href="http://basildoncoder.com/blog/category/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://basildoncoder.com/blog</link>
	<description>Incoherent and disjointed opinionated drivel from somewhere near London</description>
	<lastBuildDate>Fri, 11 Dec 2009 13:40:35 +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>Reindenting a File in Vim</title>
		<link>http://basildoncoder.com/blog/2007/12/07/reindenting-a-file-in-vim/</link>
		<comments>http://basildoncoder.com/blog/2007/12/07/reindenting-a-file-in-vim/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 18:19:31 +0000</pubDate>
		<dc:creator>russ</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://basildoncoder.com/blog/2007/12/07/reindenting-a-file-in-vim/</guid>
		<description><![CDATA[I&#8217;m going to post a series of helpful Vim snippets here, particularly for features that I don&#8217;t necessarily use every day and hence forget about after a while. By posting them here, I&#8217;ve got a nice easy one-stop-shop for finding them. The first tip is reindenting source code. Hitting &#8216;=&#8216; will reindent visually-selected code , [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to post a series of helpful Vim snippets here, particularly for features that I don&#8217;t necessarily use every day and hence forget about after a while. By posting them here, I&#8217;ve got a nice easy one-stop-shop for finding them.</p>
<p>The first tip is reindenting source code. Hitting &#8216;<code>=</code>&#8216; will reindent visually-selected code , or you can also use a motion to constrain the affected area. &#8216;<code>gg=G</code>&#8216; will reindent the entire file:</p>
<pre>
<span class="Statement">using</span> System;

<span class="Type">namespace</span> IndentExample
{
<span class="Type">public</span> <span class="Type">class</span> Indent
{
<span class="Type">public</span> <span class="Type">static</span> <span class="Type">void</span> Main(<span class="Type">string</span>[] args)
{
Console.WriteLine(<span class="Constant">&quot;badgerbadgerbadger&quot;</span>);
}
}
}
</pre>
<p>to</p>
<pre>
<span class="Statement">using</span> System;

<span class="Type">namespace</span> IndentExample
{
    <span class="Type">public</span> <span class="Type">class</span> Indent
    {
        <span class="Type">public</span> <span class="Type">static</span> <span class="Type">void</span> Main(<span class="Type">string</span>[] args)
        {
            Console.WriteLine(<span class="Constant">&quot;badgerbadgerbadger&quot;</span>);
        }
    }
}
</pre>
<p>More info: <a href="http://www.vim.org/tips/tip.php?tip_id=83">http://www.vim.org/tips/tip.php?tip_id=83</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://basildoncoder.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://basildoncoder.com/blog/2007/12/07/reindenting-a-file-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.386 seconds -->
