<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: detecting space-vs-tab indentation type in vim</title>
	<atom:link href="http://www.outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/</link>
	<description>code is freedom -- patching my itch</description>
	<pubDate>Thu, 20 Nov 2008 08:59:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Liam Quin</title>
		<link>http://www.outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-545</link>
		<dc:creator>Liam Quin</dc:creator>
		<pubDate>Thu, 15 Mar 2007 23:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-545</guid>
		<description>You'll almost certainly find life easier on Unix and Unix-like systems if you have ts=8 sw=4, and either use  control-T and control-D for indenting instead of tab and backspace, or do
:map! ^V^I ^V^T

Tabs on MS Windows are often set to be equivalent to 4 spaces, unfortunately, and for those :set ts=4 sw=4

If you have sw set right you can use the =  operators, e.g. &#62;% to indent a loop or </description>
		<content:encoded><![CDATA[<p>You&#8217;ll almost certainly find life easier on Unix and Unix-like systems if you have ts=8 sw=4, and either use  control-T and control-D for indenting instead of tab and backspace, or do<br />
:map! ^V^I ^V^T</p>
<p>Tabs on MS Windows are often set to be equivalent to 4 spaces, unfortunately, and for those :set ts=4 sw=4</p>
<p>If you have sw set right you can use the =  operators, e.g. &gt;% to indent a loop or</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bboissin</title>
		<link>http://www.outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-543</link>
		<dc:creator>bboissin</dc:creator>
		<pubDate>Sat, 10 Mar 2007 15:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-543</guid>
		<description>The following vim script is very useful, it auto-detects from the current file the indentation settings.

http://www.vim.org/scripts/script.php?script_id=1171</description>
		<content:encoded><![CDATA[<p>The following vim script is very useful, it auto-detects from the current file the indentation settings.</p>
<p><a href="http://www.vim.org/scripts/script.php?script_id=1171" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=1171</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius Gedminas</title>
		<link>http://www.outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-542</link>
		<dc:creator>Marius Gedminas</dc:creator>
		<pubDate>Sat, 10 Mar 2007 15:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-542</guid>
		<description>I personally think that it's better to set softabstop to 4, and keep tabstop at its default value of 8.</description>
		<content:encoded><![CDATA[<p>I personally think that it&#8217;s better to set softabstop to 4, and keep tabstop at its default value of 8.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominic Mazzoni</title>
		<link>http://www.outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-541</link>
		<dc:creator>Dominic Mazzoni</dc:creator>
		<pubDate>Sat, 10 Mar 2007 06:55:57 +0000</pubDate>
		<guid isPermaLink="false">http://outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-541</guid>
		<description>Audacity uses three spaces.  The story behind this is that Josh wanted four and I wanted two.  Or was it the other way around?  In any event, we decided to compromise on three, and neither of us seemed to mind.  Which is kind of funny looking back on it, because I've never found any other code with three indents anywhere else!

Anyway, we put the following "magic" at the bottom of all of our source files, which then forces all vim and emacs users to automatically go into 3-spaces mode when editing that file.  If only there was magic like that for MS Visual Studio...

// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3</description>
		<content:encoded><![CDATA[<p>Audacity uses three spaces.  The story behind this is that Josh wanted four and I wanted two.  Or was it the other way around?  In any event, we decided to compromise on three, and neither of us seemed to mind.  Which is kind of funny looking back on it, because I&#8217;ve never found any other code with three indents anywhere else!</p>
<p>Anyway, we put the following &#8220;magic&#8221; at the bottom of all of our source files, which then forces all vim and emacs users to automatically go into 3-spaces mode when editing that file.  If only there was magic like that for MS Visual Studio&#8230;</p>
<p>// Local Variables:<br />
// c-basic-offset: 3<br />
// indent-tabs-mode: nil<br />
// End:<br />
//<br />
// vim: et sts=3 sw=3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralesk</title>
		<link>http://www.outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-540</link>
		<dc:creator>Ralesk</dc:creator>
		<pubDate>Fri, 09 Mar 2007 19:18:45 +0000</pubDate>
		<guid isPermaLink="false">http://outflux.net/blog/archives/2007/03/09/detecting-space-vs-tab-indentation-type-in-vim/#comment-540</guid>
		<description>“When the code has actual tabs, things break.” — unless (as your later configuration handles it too) you keep it tabs-only.  The only scary (and horribly broken) case is the mixture of tabs and spaces, which appears as the first (and recommended!!!) method in the VIM documentation about ts…

Trick: set ts, sts, sw all to the same number, and to a number you prefer (I see you use 4 unit wide indentation; so in your case, 4), and of course noet, and the tabs will be just as safe as with the number set to 8, just displayed differently.

I personally use tabs (one character = one indentation, seems pretty logical to me really) and made sure that at least VIM users don't mess my files up, so I preemptively set a magic comment with the above trick (and default it to 4).</description>
		<content:encoded><![CDATA[<p>“When the code has actual tabs, things break.” — unless (as your later configuration handles it too) you keep it tabs-only.  The only scary (and horribly broken) case is the mixture of tabs and spaces, which appears as the first (and recommended!!!) method in the VIM documentation about ts…</p>
<p>Trick: set ts, sts, sw all to the same number, and to a number you prefer (I see you use 4 unit wide indentation; so in your case, 4), and of course noet, and the tabs will be just as safe as with the number set to 8, just displayed differently.</p>
<p>I personally use tabs (one character = one indentation, seems pretty logical to me really) and made sure that at least VIM users don&#8217;t mess my files up, so I preemptively set a magic comment with the above trick (and default it to 4).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
