<?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>Damien Lespiau &#187; misc</title>
	<atom:link href="http://damien.lespiau.name/blog/category/misc/feed/" rel="self" type="application/rss+xml" />
	<link>http://damien.lespiau.name/blog</link>
	<description>errands</description>
	<lastBuildDate>Fri, 25 Jun 2010 13:07:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Per project .vimrc</title>
		<link>http://damien.lespiau.name/blog/2009/03/18/per-project-vimrc/</link>
		<comments>http://damien.lespiau.name/blog/2009/03/18/per-project-vimrc/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 22:52:40 +0000</pubDate>
		<dc:creator>damien</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://damien.lespiau.name/blog/?p=110</guid>
		<description><![CDATA[My natural C indentation style is basically kernel-like and my ~/.vimrc reflects that. Unfortunately I have to hack on GNUish-style projects and I really don&#8217;t want to edit my ~/.vimrc every single time I switch between different indentation styles.
Modelines are evil.
To solve that terrible issue, vim can use per directory configuration files. To enable that [...]]]></description>
			<content:encoded><![CDATA[<p>My natural C indentation style is basically kernel-like and my <code class="filename">~/.vimrc</code> reflects that. Unfortunately I have to hack on GNUish-style projects and I really don&#8217;t want to edit my <code class="filename">~/.vimrc</code> every single time I switch between different indentation styles.</p>
<p>Modelines are evil.</p>
<p>To solve that terrible issue, <code class="command">vim</code> can use per directory configuration files. To enable that neat feature only two little lines are needed in your <code class="filename">~/.vimrc</code>:</p>
<pre>set exrc			" enable per-directory .vimrc files
set secure			" disable unsafe commands in local .vimrc files</pre>
<p>Then it&#8217;s just a matter of writing a per project <code class="filename">.vimrc</code> like this one:</p>
<pre>set tabstop=8
set softtabstop=2
set shiftwidth=2
set expandtab
set cinoptions=&gt;4,n-2,{2,^-2,:0,=2,g0,h2,t0,+2,(0,u0,w1,m1</pre>
<p>You can find help with the wonderful <code>cinoptions</code> variable in the <a title="cinoptions documentation" href="http://vimdoc.sourceforge.net/htmldoc/indent.html#cinoptions-values">Vim documentation</a>. As sane persons open files from the project&#8217;s root directory, this works like a charm. As for the Makefiles, they are special anyway, you really should add an autocmd in your <code class="filename">~/.vimrc</code>.</p>
<pre>" add list lcs=tab:>-,trail:x for tab/trailing space visuals
autocmd BufEnter ?akefile* set noet ts=8 sw=8 nocindent</pre>
]]></content:encoded>
			<wfw:commentRss>http://damien.lespiau.name/blog/2009/03/18/per-project-vimrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim macro for change log entry in .spec files</title>
		<link>http://damien.lespiau.name/blog/2009/02/10/vim-macro-for-change-log-entry-in-spec-files/</link>
		<comments>http://damien.lespiau.name/blog/2009/02/10/vim-macro-for-change-log-entry-in-spec-files/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 12:38:37 +0000</pubDate>
		<dc:creator>damien</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://damien.lespiau.name/blog/?p=28</guid>
		<description><![CDATA[Tired of writing this kind of lines by hand ?
* Mon Feb 09 2009 Damien Lespiau &#60;damien.lespiau@xxxx.com&#62; 1.4.3
This vim macro does just this for you!
nmap ,mob-ts :r!date +'\%a \%b \%d \%Y'&#60;CR&#62;0i* &#60;ESC&#62;$a Damien Lespiau &#60;damien.lespiau@xxxx.com&#62; FIXME
]]></description>
			<content:encoded><![CDATA[<p>Tired of writing this kind of lines by hand ?</p>
<p><code>* Mon Feb 09 2009 Damien Lespiau &lt;damien.lespiau@xxxx.com&gt; 1.4.3</code></p>
<p>This vim macro does just this for you!</p>
<p><code>nmap ,mob-ts :r!date +'\%a \%b \%d \%Y'&lt;CR&gt;0i* &lt;ESC&gt;$a Damien Lespiau &lt;damien.lespiau@xxxx.com&gt; FIXME</code></p>
]]></content:encoded>
			<wfw:commentRss>http://damien.lespiau.name/blog/2009/02/10/vim-macro-for-change-log-entry-in-spec-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
