<?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>Code for Concinnity &#187; e303</title>
	<atom:link href="http://cfc.kizzx2.com/index.php/tag/e303/feed/" rel="self" type="application/rss+xml" />
	<link>http://cfc.kizzx2.com</link>
	<description>beautiful and elegant solutions</description>
	<lastBuildDate>Wed, 11 Jan 2012 14:32:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>gvim &#8212; E303: Unable to open swap file for &#8220;[No Name]&#8220;, recovery impossible</title>
		<link>http://cfc.kizzx2.com/index.php/gvim-e303-unable-to-open-swap-file-for-no-name-recovery-impossible/</link>
		<comments>http://cfc.kizzx2.com/index.php/gvim-e303-unable-to-open-swap-file-for-no-name-recovery-impossible/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 19:58:56 +0000</pubDate>
		<dc:creator>kizzx2</dc:creator>
				<category><![CDATA[Useful tips]]></category>
		<category><![CDATA[e303]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://cfc.kizzx2.com/?p=60</guid>
		<description><![CDATA[vim is my editor of choice and I install it in Windows. All is working quite good except one little annoyance &#8212; when I open the editor fresh and started editing by going into insert mode, it will give this error message: 1E303: Unable to open swap file for &#34;[No Name]&#34;, recovery impossible This is [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin-left: 10px; float: right;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcfc.kizzx2.com%2Findex.php%2Fgvim-e303-unable-to-open-swap-file-for-no-name-recovery-impossible%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcfc.kizzx2.com%2Findex.php%2Fgvim-e303-unable-to-open-swap-file-for-no-name-recovery-impossible%2F&amp;source=kizzx2&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://vim.org">vim</a> is my editor of choice and I install it in Windows. All is working quite good except one little annoyance &#8212; when I open the editor fresh and started editing by going into <em>insert mode</em>, it will give this error message:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">E303: Unable to open swap file for &quot;[No Name]&quot;, recovery impossible</div></td></tr></tbody></table></div>

<p>This is usually harmless, as soon as I save the file everything would be great, it&#8217;s just that 1 &#8211; 2 seconds of pause that doesn&#8217;t make me feel good, so today I tried to pin down the problem and here&#8217;s how it went:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">:help E303<br />
(So it's related to the swap file. Let's see where our swap file fails to be created.)<br />
:set directory?<br />
directory=.;c:\tmp;c:\temp<br />
(Oh, those are the default %TEMP% which I moved to another drive! But anyway, the first priority should be the current directory. So let's see where we're now)<br />
:pwd<br />
C:\Windows\system32</div></td></tr></tbody></table></div>

<h2>Solution</h2>

<p>OK it&#8217;s pretty obvious now. It probably needs a little bit of manual fixing. Let&#8217;s put this in our <code>.vimrc</code></p>

<div class="codecolorer-container vim default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="vim codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #adadad; font-style: italic;">&quot; Thanks for an anonymous guest to provide this generic, better solution</span><br />
<span style="color: #804040;">set</span> <span style="color: #668080;">directory</span>=<span style="color: #000000;">.</span>,<span style="color: #000000;">$</span>TEMP<span style="color: #adadad; font-style: italic;"><br />
<br />
&quot; This is line I used at first. The above line is better than this</span><br />
<span style="color: #804040;">set</span> <span style="color: #668080;">directory</span>=<span style="color: #000000;">.</span>,d<span style="color: #000000;">:</span>\temp</div></td></tr></tbody></table></div>

<p>Great, problem solved!</p>
]]></content:encoded>
			<wfw:commentRss>http://cfc.kizzx2.com/index.php/gvim-e303-unable-to-open-swap-file-for-no-name-recovery-impossible/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

