<?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>Nicolás Brailovsky &#187; Vim Tips</title>
	<atom:link href="http://nicolasb.com.ar/category/vim/vim-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicolasb.com.ar</link>
	<description>A modern blog</description>
	<lastBuildDate>Thu, 09 Sep 2010 10:00:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Vim Sexual Care</title>
		<link>http://nicolasb.com.ar/2010/09/vim-sexual-care/</link>
		<comments>http://nicolasb.com.ar/2010/09/vim-sexual-care/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 10:00:00 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[Vim Tips]]></category>
		<category><![CDATA[WTF]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=978</guid>
		<description><![CDATA[


Vim bestows its users all sort of magical properties, among which now we can count increased sexual performance. I bet you didn&#8217;t know, but Vim can help you keep your girl happy for days without end. Don&#8217;t believe me? Check this page.




]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td>Vim bestows its users all sort of magical properties, among which now we can count increased sexual performance. I bet you didn&#8217;t know, but Vim can help you keep your girl happy for days without end. Don&#8217;t believe me? Check <a href="http://www.vitasprings.com/vim-nutrition-supplement-for-sexual-care.html">this page</a>.</td>
<td><a href="http://nicolasb.com.ar/archivos/2010/08/vitasprings_2120_71441477.jpeg"><img class="aligncenter size-full wp-image-1027" title="vitasprings_2120_71441477" src="http://nicolasb.com.ar/archivos/2010/08/vitasprings_2120_71441477.jpeg" alt="" width="108" height="108" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2010/09/vim-sexual-care/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thanks for flying vim</title>
		<link>http://nicolasb.com.ar/2010/07/thanks-for-flying-vim/</link>
		<comments>http://nicolasb.com.ar/2010/07/thanks-for-flying-vim/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 13:25:13 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=966</guid>
		<description><![CDATA[Have you ever used Vim through ssh and saw your xterm title changes to &#8220;Thanks for flying vim&#8221;? It happens a lot to me, and I usualy notice about an hour later. I&#8217;m not sure what&#8217;s the use of this, I guess it&#8217;s related to Vim airlines (no, really, check vim-avia.com), but it can be [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever used Vim through ssh and saw your xterm title changes to &#8220;Thanks for flying vim&#8221;? It happens a lot to me, and I usualy notice about an hour later. I&#8217;m not sure what&#8217;s the use of this, I guess it&#8217;s related to Vim airlines (no, really, check <a href="http://www.vim-avia.com/">vim-avia.com</a>), but it can be turned off:</p>
<blockquote><p>When using vim in an xterm it renames the title of that window to &#8220;Thanks for flying vim&#8221; on exit.</p>
<p>Q: How to turn off the message &#8220;Thanks for flying vim&#8221;?<br />
A: :set notitle</p></blockquote>
<p>&#8211; <a href="http://www.vmunix.com/vim/answ.html">http://www.vmunix.com/vim/answ.html</a></p>
<p><a href="http://nicolasb.com.ar/archivos/2009/06/vim_airlines.jpg"><img class="aligncenter size-thumbnail wp-image-410" title="vim_airlines" src="http://nicolasb.com.ar/archivos/2009/06/vim_airlines-150x150.jpg" alt="" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2010/07/thanks-for-flying-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim tips: make things work again</title>
		<link>http://nicolasb.com.ar/2010/06/vim-tips-make-things-work-again/</link>
		<comments>http://nicolasb.com.ar/2010/06/vim-tips-make-things-work-again/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 12:48:56 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=756</guid>
		<description><![CDATA[Use cnext and cprev to cycle through the compile errors in Vim.]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td><a href="http://nicolasb.com.ar/archivos/2009/03/vim_editor.gif"><img class="aligncenter size-full wp-image-159" title="vim_editor" src="http://nicolasb.com.ar/archivos/2009/03/vim_editor.gif" alt="" width="125" height="60" /></a></td>
<td>Are you <a href="http://nicolasb.com.ar/2009/11/vim-make/">using :make within vim</a>? If you are, then you probably noticed that getting lots of compiler errors is not uncommon, and that vim has a tendency of jumping to the first error found&#8230; but what happens if you want to see subsequent errors too, because you&#8217;re a really crappy programmer and need to find the 10 or 20 errors you just introduced with your single line edit?</td>
</tr>
</tbody>
</table>
<p>Luckily Vim is always the anwser, just use <strong>cnext </strong>and <strong>cprev </strong>until you reach the error you are looking for.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2010/06/vim-tips-make-things-work-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim tips: make things work</title>
		<link>http://nicolasb.com.ar/2010/06/vim-tips-make-things-work/</link>
		<comments>http://nicolasb.com.ar/2010/06/vim-tips-make-things-work/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 10:00:33 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=642</guid>
		<description><![CDATA[Typing :make will execute the makefile in your current path]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td>So, you are an uber console geek, using only vim and the command line to compile all your projects, execute the tests, blah blah blah&#8230; if only you could squeeze that microsecond lost whenever you switch from vim to compile you&#8217;d be 1e-4 seconds more productive&#8230; oh, wait, you can!</td>
<td><a href="http://nicolasb.com.ar/archivos/2009/05/success_vim.jpg"><img class="aligncenter size-medium wp-image-343" title="success_vim" src="http://nicolasb.com.ar/archivos/2009/05/success_vim-273x300.jpg" alt="" width="164" height="180" /></a></td>
</tr>
</tbody>
</table>
<p>Whenever you think you&#8217;re project is good enough to compile just hit <strong>:make</strong> to be proven wrong. Type <strong>:make test</strong> to run your tests (because you are using <a href="http://nicolasb.com.ar/?s=tdd">TDD</a>, <a href="http://nicolasb.com.ar/?s=test">aren&#8217;t you</a>?) and watch all those red flags fly by.Also, add the following mapping to your ~/.vimrc for an extra happy coding session:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">map &lt;F5&gt; :<span class="kw2">make</span></div>
</li>
<li class="li1">
<div class="de1">map &lt;F6&gt; :<span class="kw2">make</span> <span class="kw3">test</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2010/06/vim-tips-make-things-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim tip: reuse gVim instance</title>
		<link>http://nicolasb.com.ar/2010/05/vim-tip-reuse-gvim-instance/</link>
		<comments>http://nicolasb.com.ar/2010/05/vim-tip-reuse-gvim-instance/#comments</comments>
		<pubDate>Fri, 14 May 2010 10:00:02 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=357</guid>
		<description><![CDATA[Use --remote-tab-silent in gVim to reuse an open instance]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td>/* Usual rant about Vim being great */, /* usual rant about everything else being plain awful */. /* Comment stating that if you don&#8217;t use Vim then you suck */. And now, one more reason to use gVim: instance reuse! Yes, you can save many many KB or RAM by using &#8211;remote-tab-silent when openning a document in gVim. (clearly this would have been &#8220;many many GB of RAM&#8221; if we were talking about emacs).</td>
<td><a href="http://nicolasb.com.ar/archivos/2009/03/vim_editor.gif"><img class="aligncenter size-full wp-image-159" title="vim_editor" src="http://nicolasb.com.ar/archivos/2009/03/vim_editor.gif" alt="" width="125" height="60" /></a></td>
</tr>
</tbody>
</table>
<p>If you don&#8217;t like adding <em>&#8211;remote-tab-silent</em> each and every time you use gVim to open a file, then you are a lazy bum and I congratulate you. Define an alias in your bashrc to save precious typing microseconds too.</p>
<p>/Sarcasm mode off</p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2010/05/vim-tip-reuse-gvim-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim tip: Word count</title>
		<link>http://nicolasb.com.ar/2010/04/vim-tip-word-count/</link>
		<comments>http://nicolasb.com.ar/2010/04/vim-tip-word-count/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 10:00:01 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=643</guid>
		<description><![CDATA[Vim's g, CTRL+g will give you a word count]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td><a href="http://nicolasb.com.ar/archivos/2009/05/success_vim.jpg"><img class="aligncenter size-thumbnail wp-image-343" title="success_vim" src="http://nicolasb.com.ar/archivos/2009/05/success_vim-150x150.jpg" alt="" width="150" height="150" /></a></td>
<td>Trying to count words is a common task. Whenever you&#8217;re writting a report for class, that is. There are some legitimate reasons but they don&#8217;t matter now: it&#8217;s a great chance to show off how great Vim is.</td>
</tr>
</tbody>
</table>
<p>First method: Type ggVgY&#8221;*p to copy the whole text. Then paste it into word and use word count.<br />
Second method: Type %!wc -w, which executes wc on each line.<br />
Third method: Type g^g (g, CTRL+g) and watch the bottom of your screen.</p>
<p>As ussual, Vim rocks.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2010/04/vim-tip-word-count/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim tip: Remapping</title>
		<link>http://nicolasb.com.ar/2010/03/vim-tip-remapping/</link>
		<comments>http://nicolasb.com.ar/2010/03/vim-tip-remapping/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 10:00:43 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=764</guid>
		<description><![CDATA[Use inoremap to change a word into another word when typing. Useful for autocompleting code.]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td>We all know is the funnier editor in the world. You can even use it to <a href="http://nicolasb.com.ar/2009/09/vim-tip-rot-13/">rot13</a> all your code and have lots of laughs when committing. But what if you want to automagicaly change a random word into another word? Well then inoremap comes handy, just adding this to your ~/.vimrc:</td>
<td><a href="http://nicolasb.com.ar/archivos/2009/06/vim_airlines.jpg"><img class="aligncenter size-thumbnail wp-image-410" title="vim_airlines" src="http://nicolasb.com.ar/archivos/2009/06/vim_airlines-150x150.jpg" alt="" width="150" height="150" /></a></td>
</tr>
</tbody>
</table>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">inoremap hola mundo</div>
</li>
</ol>
</div>
<p>and suddenly whenever typing &#8220;hola&#8221; you&#8217;ll see &#8220;mundo&#8221; instead. LOL. I guess it&#8217;s useful to fix typos, or to autocomplete code. Or to change &#8220;Hello&#8221; into &#8220;Fuck you&#8221; in you friend&#8217;s vimrc, whichever you think it&#8217;s appropriate..</p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2010/03/vim-tip-remapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim Tip: Open file in new tab</title>
		<link>http://nicolasb.com.ar/2009/10/vim-tip-open-file-in-new-tab/</link>
		<comments>http://nicolasb.com.ar/2009/10/vim-tip-open-file-in-new-tab/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 10:00:39 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=593</guid>
		<description><![CDATA[Use C-W g f with the cursor over a filename to open in a new tab]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td>How many times have you been on a project which #includes another file and wanted to see what that file was? Well you can navigate the source code tree in a gui if you use eclipse. You can go to File &gt; Open and, again, fight with a nice gui in Notepad. Or you can open up that file with four keystrokes in a real editor, THE real editor. Just use &#8220;C-W g f&#8221; with the cursor over the filename and it&#8217;ll open in a new tab, ready for you to hack away more code.</td>
<td><a href="http://nicolasb.com.ar/archivos/2009/05/success_vim.jpg"><img class="aligncenter size-medium wp-image-343" title="success_vim" src="http://nicolasb.com.ar/archivos/2009/05/success_vim-273x300.jpg" alt="success_vim" width="273" height="300" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2009/10/vim-tip-open-file-in-new-tab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim Tip: Folding FTW</title>
		<link>http://nicolasb.com.ar/2009/10/vim-tip-folding-ftw/</link>
		<comments>http://nicolasb.com.ar/2009/10/vim-tip-folding-ftw/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 10:00:14 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=535</guid>
		<description><![CDATA[


I always say methods should have two levels of indentation at most, but even if your code is perfect like mine you may still have to dwell with other people&#8217;s code (which, obviously, is ugly code), people how may have lots of fun shaping the program like a pyramid.




Not all is lost, you don&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td>I always say methods should have two levels of indentation at most, but even if your code is perfect like mine you may still have to dwell with other people&#8217;s code (which, obviously, is ugly code), people how may have lots of fun shaping the program like a pyramid.</td>
<td><a href="http://nicolasb.com.ar/archivos/2009/10/0040-teddy-bear-sepuku.jpg"><img class="aligncenter size-thumbnail wp-image-582" title="0040-teddy-bear-sepuku" src="http://nicolasb.com.ar/archivos/2009/10/0040-teddy-bear-sepuku-150x150.jpg" alt="0040-teddy-bear-sepuku" width="150" height="150" /></a></td>
</tr>
</tbody>
</table>
<p>Not all is lost, you don&#8217;t have to commit sepuku (at least not for this one). Just use Vim&#8217;s indent method like this:</p>
<p><span lang="vim"><br />
:set foldmethod=indent<br />
</span></p>
<p>That should give you a better view of the code flow. As always, use &#8216;%&#8217; to navigate all those pesky { and }.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2009/10/vim-tip-folding-ftw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim Tip: Rot 13</title>
		<link>http://nicolasb.com.ar/2009/09/vim-tip-rot-13/</link>
		<comments>http://nicolasb.com.ar/2009/09/vim-tip-rot-13/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 11:00:39 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=541</guid>
		<description><![CDATA[Use g? to Rot13 the selected text]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td><a href="http://nicolasb.com.ar/archivos/2009/03/vim_editor.gif"><img class="aligncenter size-full wp-image-159" title="vim_editor" src="http://nicolasb.com.ar/archivos/2009/03/vim_editor.gif" alt="vim_editor" width="125" height="60" /></a></td>
<td>Are you still puzzled by <a href="http://nicolasb.com.ar/2009/09/c-incredibly-useless-stuff">last week&#8217;s C++ question</a>, yet you are too lazy to actually search for a Rot13 decoder OR use gcc to check if it works? Well, Vim can do the trick, just use g? to convert text to Rot13</td>
</tr>
</tbody>
</table>
<p>You may combine it with block selection or you can just convert the whole damn thing using &#8220;ggg?G&#8221;. gg goes to the beggining, g? converts to rot13, G goes to the end.</p>
<p>This is all very nice but I&#8217;m still trying to figure out a way to convert back from rot13 to normal text, can anyone provide a clue?</p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2009/09/vim-tip-rot-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
