<?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>Jetpack Flight Log &#187; vim</title>
	<atom:link href="http://jetpackweb.com/blog/topics/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://jetpackweb.com/blog</link>
	<description>Rock{et}ing the interweb</description>
	<lastBuildDate>Sun, 12 Jun 2011 17:51:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Vim for Rails Developers Screencast</title>
		<link>http://jetpackweb.com/blog/2010/04/30/vim-for-rails-developers-screencast/</link>
		<comments>http://jetpackweb.com/blog/2010/04/30/vim-for-rails-developers-screencast/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 17:37:31 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=799</guid>
		<description><![CDATA[Ben Orenstein was kind enough to send me a review copy of his Vim for Rails Developers screencast. Vim is pretty much the only text editor I have used for a few years now and I consider myself a fairly experienced user. This screencast showed me some useful new tips that I have been able [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/r00k" target="_blank">Ben Orenstein</a> was kind enough to send me a review copy of his <a href="http://www.codeulatescreencasts.com/products/vim-for-rails-developers" target="_blank">Vim for Rails Developers</a> screencast. <a href="http://www.vim.org" target="_blank">Vim</a> is pretty much the only text editor I have used for a few years now and I consider myself a fairly experienced user. This screencast showed me some useful new tips that I have been able to integrate into my daily workflow.</p>
<p>Much of the screencast focuses on the excellent <a href="http://rails.vim.tpope.net/" target="_blank">rails.vim</a> plugin, primarily using it to move around your project in incredibly efficient ways. He also covers <a href="http://www.vim.org/scripts/script.php?script_id=2540" target="_blank">snipMate</a>, <a href="http://ctags.sourceforge.net" target="_blank">ctags</a>, and searching with <a href="http://betterthangrep.com" target="_blank">ack</a>. I found his advice on using ctags quite useful for jumping around the rails source code.</p>
<p>Ben is well spoken and well paced, and I hope to see more screencasts from him(especially ones focusing on vim). <em>rails.vim</em> in particular has much more functionality to offer that I would love to see covered. If you enjoy the visual/audible style of learning be sure to also checkout <a href="http://vimcasts.org" target="_blank">vimcasts.org</a> for more vim related screencasts.</p>
<p>This screencast probably best for late-beginner to moderately skilled vim users, but even advanced users will probably learn a new technique or two. It might be a bit overwhelming if you are incredibly new to vim as it&#8217;s focus is on usage and not getting things setup or configured.</p>
<p>Overall I feel if you are looking to get serious with vim the $9 will quickly pay for itself.</p>
<p><strong>More resources:</strong></p>
<p>The Screencast: <a href="http://www.codeulatescreencasts.com/products/vim-for-rails-developers" target="_blank">Vim for Rails Developers</a><br />
My <a href="http://github.com/anveo/vimfiles" target="_blank">vimfiles</a><br />
Ben&#8217;s <a href="http://github.com/r00k/dotfiles" target="_blank">vimfiles</a><br />
Ben&#8217;s <a href="http://twitter.com/r00k" target="_blank">twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/04/30/vim-for-rails-developers-screencast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write HTML Faster with Sparkup (Vim and Textmate)</title>
		<link>http://jetpackweb.com/blog/2010/03/04/write-html-faster-with-sparkup-vim-and-textmate/</link>
		<comments>http://jetpackweb.com/blog/2010/03/04/write-html-faster-with-sparkup-vim-and-textmate/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 18:58:31 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[textmate]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[sparkup]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=770</guid>
		<description><![CDATA[I recently came across a really great Vim(and Textmate) plug-in called sparkup.vim that &#8220;lets you write HTML code faster&#8221;. It&#8217;s actually a small python script, but has editor plug-ins to work with Vim and Textmate. It allows us to write HTML faster by leveraging the terse css selector syntax and converting it the much more [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a really great Vim(and Textmate) plug-in called <a href="http://github.com/rstacruz/sparkup" target="_blank">sparkup.vim</a> that &#8220;lets you write HTML code faster&#8221;. It&#8217;s actually a small python script, but has editor plug-ins to work with Vim and Textmate. It allows us to write HTML faster by leveraging the terse css selector syntax and converting it the much more verbose HTML.</p>
<h2>Selector Expansion</h2>
<p>Selector expansion is the plug-in&#8217;s primary purpose. It lets you write in a CSS selector syntax that get expanded to full HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="css"><span class="re0">#album</span>.photo</pre></div></div>

<p>If you type that into vim and then press <strong>Ctrl-e</strong> on that line it will be expanded to:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;album&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;photo&quot;</span><span class="re2">&gt;</span></span>|<span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></pre></div></div>

<p>This next one is a bit more complicated, I&#8217;ll explain what&#8217;s going on:</p>

<div class="wp_syntax"><div class="code"><pre class="css"><span class="re0">#container</span> <span class="sy0">&gt;</span> <span class="re0">#nav</span> <span class="sy0">&gt;</span> ul <span class="sy0">&gt;</span> li<span class="re1">.first</span> <span class="br0">&#123;</span>Home<span class="br0">&#125;</span> <span class="sy0">+</span> li<span class="sy0">*</span><span class="nu0">2</span> <span class="sy0">+</span> li<span class="re1">.last</span> <span class="br0">&#123;</span>About Us<span class="br0">&#125;</span> &lt; &lt;  <span class="re0">#content</span> <span class="sy0">&gt;</span> p<span class="sy0">*</span><span class="nu0">2</span> &lt; <span class="re0">#footer</span> <span class="sy0">&gt;</span> span<span class="re1">.copyright</span> <span class="br0">&#123;</span><span class="br0">&#40;</span>c<span class="br0">&#41;</span> <span class="nu0">2010</span> Jetpack LLC<span class="br0">&#125;</span></pre></div></div>

<blockquote>
<ol>
<li>Creating a div with the id of &#8220;container&#8221;</li>
<li>Creating a div with an id of &#8220;<i>nav</i>&#8221; that is a child of the &#8220;<i>container</i>&#8221; div. The > specifies we are creating a child element in the DOM tree.</li>
<li>Creating a ul tag that is a child of &#8220;<i>nav</i>&#8220;</li>
<li>Creating an li tag with the class name &#8220;<i>first</i>&#8220;. Text in brackets will be plain text placed in-between the tag we are creating.</li>
<li>Creating two sibling li elements. The <strong>+</strong> denotes what comes next will be a sibling. The <strong>*</strong> is a multiplier to create any number of similar elements.</li>
<li>Creating an li tag with the class name &#8220;<i>last</i>&#8221; as a sibling to the previous li elements we have created. It will contain the text &#8216;<i>About Us</i>&#8216;.</li>
<li>Next now use the <strong><</strong> symbol to go up two levels of the DOM tree.</li>
<li>Next we create a div with the id of &#8220;<i>content</i>&#8221; that will contain two paragraph tags.</li>
<li>We go back up a level and add a footer div that will have a span with the class of &#8220;<i>copyright</i>&#8221; that contains some boilerplate copyright text.</li>
</ol>
</blockquote>
<p>If we press <strong>Ctrl-e</strong> on that line, it will be expanded to the following:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">  <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;container&quot;</span><span class="re2">&gt;</span></span>
    <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;nav&quot;</span><span class="re2">&gt;</span></span>
      <span class="sc3"><span class="re1">&lt;ul<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li</span> <span class="re0">class</span>=<span class="st0">&quot;first&quot;</span><span class="re2">&gt;</span></span>Home<span class="sc3"><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li<span class="re2">&gt;</span></span></span>|<span class="sc3"><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li<span class="re2">&gt;</span></span><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li</span> <span class="re0">class</span>=<span class="st0">&quot;last&quot;</span><span class="re2">&gt;</span></span>About Us<span class="sc3"><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
      <span class="sc3"><span class="re1">&lt;/ul<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;content&quot;</span><span class="re2">&gt;</span></span>
      <span class="sc3"><span class="re1">&lt;p<span class="re2">&gt;</span></span><span class="re1">&lt;/p<span class="re2">&gt;</span></span></span>
      <span class="sc3"><span class="re1">&lt;p<span class="re2">&gt;</span></span><span class="re1">&lt;/p<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;footer&quot;</span><span class="re2">&gt;</span></span>
      <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;copyright&quot;</span><span class="re2">&gt;</span></span>(c) 2010 Jetpack LLC<span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span>
  <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></pre></div></div>

<p>It will also place your cursor in the first empty tag denoted by the <strong>|</strong>. You can jump around to other empty tags with <strong>Ctrl-n</strong> (I change this mapping, more on that in a second).</p>
<p>If you are a fan of <a href="http://haml-lang.com/" target="_blank">HAML</a> but forced to use standard HTML in your projects this plug-in might make you a bit happier.</p>
<h2>Shortcuts</h2>
<p>The other piece of functionality this plug-in provides is a <a href="http://www.vim.org/scripts/script.php?script_id=2540" target="_blank">snipMate</a> like shortcuts feature. These act much like snipMate snippets except they are hard-coded into the python script. However most are still quite useful and you can view the <a href="http://github.com/rstacruz/sparkup/blob/master/sparkup" target="_bank">python script</a> to review them.</p>
<h2>Issues</h2>
<p>After installing this plugin I was having tabbing/tab-expansion issues. I believe it&#8217;s <strong>Ctrl-n</strong> mapping which allows you to jump around to empty tags was conflicting with some other plug-in I had installed, possibly <a href="http://www.vim.org/scripts/script.php?script_id=1643" target="_blank">SuperTab</a>. I remapped it by putting the following in my .vimrc:</p>

<div class="wp_syntax"><div class="code"><pre class="vim"><span class="kw1">let</span> g<span class="sy0">:</span>sparkupNextMapping = <span class="st0">'&lt;c-x&gt;'</span></pre></div></div>

<p>That doesn&#8217;t seem to conflict with anything for me, and since it only gets used in normal mode it doesn&#8217;t conflict with Tim Pope&#8217;s excellent <a href="http://github.com/tpope/vim-ragtag" target="_blank">ragtag</a> plug-in (<a href="http://www.catonmat.net/blog/vim-plugins-ragtag-allml-vim/" target="_blank">read more on that here</a>).</p>
<h2>Video Demonstration</h2>
<p>Some of this might make more sense when you see it in action, so watch the following YouTube video(make sure to switch it to 720p for crisper text):</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/Jw3jipcenKc&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Jw3jipcenKc&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<h2>Conclusion</h2>
<p>Have fun writing faster HTML! You can see more examples on <a href="http://github.com/rstacruz/sparkup" target="_blank">sparkup&#8217;s Github page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/03/04/write-html-faster-with-sparkup-vim-and-textmate/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Vim Tips for Ruby (and your wrists)</title>
		<link>http://jetpackweb.com/blog/2010/02/15/vim-tips-for-ruby/</link>
		<comments>http://jetpackweb.com/blog/2010/02/15/vim-tips-for-ruby/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 18:02:08 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=688</guid>
		<description><![CDATA[Each time I am forced to type non-alpha-numeric characters during a coding session I feel that the flow and speed of my typing suffers. Not to mention depending on the size of your hands and how (im)properly you type, those keys can also put extra strain on your wrists. Since Ruby and Rails make extensive [...]]]></description>
			<content:encoded><![CDATA[<p>Each time I am forced to type non-alpha-numeric characters during a coding session I feel that the flow and speed of my typing suffers. Not to mention depending on the size of your hands and how (im)properly you type, those keys can also put extra strain on your wrists. Since Ruby and Rails make extensive use of <strong>:</strong>symbols and hash-rockets ( <strong>=></strong> ) I felt the need to optimize their entry. </p>
<h3><strong>Hash-Rocket Insertion</strong></h3>

<div class="wp_syntax"><div class="code"><pre class="vim"><span class="co1">&quot; bind control-l to hashrocket</span>
imap <span class="sy0">&lt;</span>C<span class="sy0">-</span>l<span class="sy0">&gt;</span> <span class="sy0">&lt;</span>Space<span class="sy0">&gt;</span>=<span class="sy0">&gt;&lt;</span>Space<span class="sy0">&gt;</span><span class="co1">&quot;</span></pre></div></div>

<p>This emulates TextMate&#8217;s hash-rocket insertion. Just press Ctrl-L when in insert mode for a hash-rocket and leading quote to be inserted. Thanks to <a href="http://technicalpickles.com/posts/vimpocalypse/" target="_blank">TechnicalPickles</a> for this one.</p>
<p>If you use this with <a href="http://www.vim.org/scripts/script.php?script_id=1849" target="_blank">autoClose.vim</a> the trailing quote will be inserted too. There are times when you don&#8217;t want  quotes surrounding the hash value like booleans and symbols, so use <a href="http://www.vim.org/scripts/script.php?script_id=1697" target="_blank">surround.vim</a> and type <strong>ds&#8221;</strong>. <i>Poof!</i> gone are the quotes.</p>
<h3><strong>Word to Symbol</strong></h3>

<div class="wp_syntax"><div class="code"><pre class="vim"><span class="co1">&quot; convert word into ruby symbol</span>
imap <span class="sy0">&lt;</span>C<span class="sy0">-</span>k<span class="sy0">&gt;</span> <span class="sy0">&lt;</span>C<span class="sy0">-</span>o<span class="sy0">&gt;</span>b<span class="sy0">:&lt;</span>Esc<span class="sy0">&gt;</span>Ea
nmap <span class="sy0">&lt;</span>C<span class="sy0">-</span>k<span class="sy0">&gt;</span> lbi<span class="sy0">:&lt;</span>Esc<span class="sy0">&gt;</span>E</pre></div></div>

<p>This will turn any word into a symbol by prefixing it with a colon. It works in either Insert or Command mode. In command mode just place your cursor over the word and press Ctrl-k. While in Insert mode pressing Ctrl-k will convert the current word you are typing into a symbol.</p>
<p>You could probably make the argument it&#8217;s easier just to type the colon.  To each his own but I have seen a lot of people who bend their right wrist to press both <strong>Shift</strong> and <strong>;</strong> entirely with their right hand which puts strain on the wrist. Since symbols are often used right before the hash-rocket, chaining these two shortcuts can be a bit more fluid IMHO(the caret denotes the cursor position):</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">render action^<span class="sy0">&lt;</span>Ctrl<span class="sy0">-</span>k<span class="sy0">&gt;&lt;</span>Ctrl<span class="sy0">-</span>l<span class="sy0">&gt;</span>
&nbsp;
<span class="co1"># Will be transformed to</span>
&nbsp;
render <span class="re3">:action</span> <span class="sy0">=&gt;</span> <span class="st0">&quot;^&quot;</span></pre></div></div>

<h3><strong>Symbol to Proc snippets</strong></h3>

<div class="wp_syntax"><div class="code"><pre class="ruby">snippet collecta
             collect<span class="br0">&#40;</span><span class="sy0">&amp;</span>:$<span class="br0">&#123;</span><span class="nu0">1</span>:symbol<span class="br0">&#125;</span><span class="br0">&#41;</span>$<span class="br0">&#123;</span><span class="nu0">2</span><span class="br0">&#125;</span>
snippet mapa
             map<span class="br0">&#40;</span><span class="sy0">&amp;</span>:$<span class="br0">&#123;</span><span class="nu0">1</span>:symbol<span class="br0">&#125;</span><span class="br0">&#41;</span>$<span class="br0">&#123;</span><span class="nu0">2</span><span class="br0">&#125;</span></pre></div></div>

<p>The <strong>collection.collect(&amp;:symbol)</strong> is a great shortcut I use often in Rails, these <a href="http://www.vim.org/scripts/script.php?script_id=2540" target="_blank">snipMate.vim</a> snippets make for less awkward entry.</p>
<h3><strong>Easy Command Mode Entry</strong></h3>

<div class="wp_syntax"><div class="code"><pre class="vim"><span class="co1">&quot; Easier non-interactive command insertion</span>
<span class="kw1">nnoremap</span> <span class="sy0">&lt;</span>Space<span class="sy0">&gt;</span> <span class="sy0">:</span></pre></div></div>

<p>This one has nothing to do with Ruby, but instead of typing the colon every time to want to enter a new command in Command mode, just hit the spacebar!</p>
<h3><strong>Swap Esc and Caps-Lock</strong></h3>
<p>Another tip not specific to Ruby or even Vim really. I think using the Caps-Lock key as escape in Vim is the most efficient and quickest way to cancel some commands or exit certain modes. I prefer to swap them at the Operating System level rather than .vimrc hacks because I find the switch convenient in almost all applications, not just Vim. Consult Google to find out how to do it in your OS.</p>
<h3><strong>Conclusion</strong></h3>
<p>That&#8217;s it! If anyone has any other vim tips for ruby I would love to hear them!  Also feel free to dig through my <a href="http://github.com/anveo/dotfiles" target="_blank">dotfiles</a> and <a href="http://github.com/anveo/vimfiles" target="_blank">vimfiles</a> to glean other tips.</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/02/15/vim-tips-for-ruby/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to keep your Vim Plugins up to date</title>
		<link>http://jetpackweb.com/blog/2010/01/12/how-to-keep-your-vim-plugins-up-to-date/</link>
		<comments>http://jetpackweb.com/blog/2010/01/12/how-to-keep-your-vim-plugins-up-to-date/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 01:47:51 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=609</guid>
		<description><![CDATA[It&#8217;s not too hard to learn something new everyday about vim, but did you know there is an easy way to keep your plugins up-to-date? GetLatestVimScripts is a plugin that can do just that. You can grab the latest version from the webpage, but it&#8217;s most likely your distributions vim package already has it (Debian, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not too hard to learn something new everyday about vim, but did you know there is an easy way to keep your plugins up-to-date? <a href="http://www.vim.org/scripts/script.php?script_id=642" target="_blank">GetLatestVimScripts</a> is a plugin that can do just that. You can grab the latest version from the webpage, but it&#8217;s most likely your distributions vim package already has it (Debian, Redhat, OSX, and MacPorts do anyway &#8211; check <i>/usr/share/vim/vim72/plugin</i>).</p>
<p>How does it know where to find updates? Either we manually add information about each of our plugins to a special config file, or plugin authors can embed a special comment in their scripts to be update friendly:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">head</span> ~<span class="sy0">/</span>.vim<span class="sy0">/</span>plugin<span class="sy0">/</span>rails.vim</pre></div></div>

<pre style="background-color: #dfdfdf">
" rails.vim - Detect a rails application
" Author:       Tim Pope vimNOSPAM@tpope.info
<b>" GetLatestVimScripts: 1567 1 :AutoInstall: rails.vim</b>
" URL:          http://rails.vim.tpope.net/

" Install this file as plugin/rails.vim.  See doc/rails.txt for details. (Grab
...
</pre>
<p>The bold-ed line will tell the plugin where to find updates. More on that in a minute. First lets create the directory where updates will be downloaded, and a configuration file will be placed:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">mkdir</span> ~<span class="sy0">/</span>.vim<span class="sy0">/</span>GetLatest
<span class="kw2">touch</span> ~<span class="sy0">/</span>.vim<span class="sy0">/</span>GetLatest<span class="sy0">/</span>GetLatestVimScripts.dat</pre></div></div>

<p>By default the plugin will only download the updates and not install them. To enable auto-install put the following in your .vimrc:</p>

<div class="wp_syntax"><div class="code"><pre class="vim"><span class="kw1">let</span> g<span class="sy0">:</span>GetLatestVimScripts_allowautoinstall=<span class="nu0">1</span></pre></div></div>

<p>Now run <strong>:GetLatestVimScripts</strong> or <strong>:GLVS</strong>. Vim will analyze your plugins, see if they contain information about their download location, and add it to the .dat file. Then it will <i>wget</i> the plugins and install them. If you had any plugins that were update friendly, they are now updated to the latest version! Since not all plugins are update friendly, you may have to manually add lines to the <i>GetLatest/GetLatestVimScripts.dat</i>. The format looks like this:</p>
<pre>
ScriptID SourceID Filename
--------------------------
294 10110 :AutoInstall: Align.vim
1896 7356 :AutoInstall: allml.vim
1066 7618 :AutoInstall: cecutil.vim
1984 11852 :AutoInstall: FuzzyFinder
1984 11852 :AutoInstall: fuzzyfinder.vim
1567 11920 :AutoInstall: rails.vim
1697 8283 :AutoInstall: surround.vim
</pre>
<p>The first two lines act as comments but are required, so don&#8217;t remove them! Next is the <strong>ScriptID</strong> which is the <i>script_id</i> url parameter on the plugin&#8217;s vim.org webpage (ex: http://www.vim.org/scripts/script.php?<strong>script_id=642</strong>). Then there is the <strong>SourceID</strong> which is a url parameter which identifies the version of the plugin (ex: http://www.vim.org/scripts/download_script.php?<strong>src_id=8283</strong>). The ScriptID is what is compared for newer versions. If you are adding a new plugin, you can just set it to <strong>1</strong>, run an update, and the number will automatically be set to the latest version. <strong>:AutoInstall:</strong> is a flag that signifies the update should be installed after download, and lastly <strong>Filename</strong> is just the filename of the plugin.</p>
<p><a href="http://github.com/anveo/vimfiles/blob/master/GetLatest/GetLatestVimScripts.dat" target="_blank">GetLatestVimScripts.dat</a> is an example of my update configuration. Also checkout my <a href="http://github.com/anveo/vimfiles" target="_blank">vimfiles</a> and <a href="" target="_blank">dotfiles</a> git repos for more vim and shell scripts you might find useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/01/12/how-to-keep-your-vim-plugins-up-to-date/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rails autocompletion in MacVim when using Macports</title>
		<link>http://jetpackweb.com/blog/2009/10/02/rails-autocompletion-in-macvim-when-using-macports/</link>
		<comments>http://jetpackweb.com/blog/2009/10/02/rails-autocompletion-in-macvim-when-using-macports/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 22:33:10 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=439</guid>
		<description><![CDATA[In moving much of my development over to OS X, I started receiving errors when trying to use vim&#8217;s omnicompletion in Rails projects. An excerpt from my vim config to enable that functionality looks like this: &#34; Turn on language specific omnifuncs autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1 autocmd [...]]]></description>
			<content:encoded><![CDATA[<p>In moving much of my development over to OS X, I started receiving errors when trying to use vim&#8217;s omnicompletion in Rails projects. An excerpt from my vim config to enable that functionality looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="vim"><span class="co1">&quot; Turn on language specific omnifuncs</span>
<span class="kw1">autocmd</span> <span class="kw3">FileType</span> ruby,eruby <span class="kw1">set</span> <span class="kw2">omnifunc</span>=rubycomplete#Complete
<span class="kw1">autocmd</span> <span class="kw3">FileType</span> ruby,eruby <span class="kw1">let</span> g<span class="sy0">:</span>rubycomplete_buffer_loading = <span class="nu0">1</span>
<span class="kw1">autocmd</span> <span class="kw3">FileType</span> ruby,eruby <span class="kw1">let</span> g<span class="sy0">:</span>rubycomplete_rails = <span class="nu0">1</span>
<span class="kw1">autocmd</span> <span class="kw3">FileType</span> ruby,eruby <span class="kw1">let</span> g<span class="sy0">:</span>rubycomplete_classes_in_global = <span class="nu0">1</span>
<span class="kw1">autocmd</span> <span class="kw3">FileType</span> ruby,eruby <span class="kw1">let</span> g<span class="sy0">:</span>rubycomplete_include_object = <span class="nu0">1</span>
<span class="kw1">autocmd</span> <span class="kw3">FileType</span> ruby,eruby <span class="kw1">let</span> g<span class="sy0">:</span>rubycomplete_include_objectspace = <span class="nu0">1</span></pre></div></div>

<p>When I tried to auto-complete something(Ctrl^X^O), I would receive the following error:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="st0">&quot;-- Omni completion (^O^N^P) -- Searching...Rails requires RubyGems &gt;= 1.3.5 (you have 1.0.1). Please <span class="es5">`gem update --system`</span> and try again. Error loading rails environment&quot;</span></pre></div></div>

<p>Long story short, I was using MacPort&#8217;s ruby/gem packages, but a binary snapshot of MacVim that I downloaded off their website was using the libraries that come with OSX. There is not really a clean workaround for that, but luckily it turns out macport&#8217;s macvim builds the latest snapshot. So all you need to is to install macvim with ruby support:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> port <span class="kw2">install</span> macvim +ruby</pre></div></div>

<p>And you will get nice auto-completion:</p>
<p><a href="http://jetpackweb.com/blog/wp-content/uploads/2009/10/macvim_omnicomplete.png"><img src="http://jetpackweb.com/blog/wp-content/uploads/2009/10/macvim_omnicomplete-300x221.png" alt="macvim_omnicomplete" title="macvim_omnicomplete" width="300" height="221" class="aligncenter size-medium wp-image-444" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2009/10/02/rails-autocompletion-in-macvim-when-using-macports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

