<?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>Tue, 20 Dec 2011 09:00:54 +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 Tip: Converting to a Beamer frame</title>
		<link>http://nicolasb.com.ar/2011/12/vim-tip-converting-to-a-beamer-frame/</link>
		<comments>http://nicolasb.com.ar/2011/12/vim-tip-converting-to-a-beamer-frame/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 09:00:32 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=1311</guid>
		<description><![CDATA[map xi\begin{frame}{TITLE}\end{frame}kp]]></description>
			<content:encoded><![CDATA[<p>Today we&#8217;ll learn how to convert the text under the cursor to a Beamer frame, yet it&#8217;s easy to apply the same technique for other stuff:</p>
<p>map  xi\begin{frame}{TITLE}\end{frame}kp</p>
<p>Lets analyze it<br />
* xi cut whatever is selected and enter insert mode<br />
* \begin{frame}{TITLE}\end{frame} write the beamer frame declaration<br />
* kp go up one line and paste what was on the buffer</p>
<p>You can do something like this whenever you need to map text in Vim, it&#8217;s very easy.</p>
<p><a href="http://nicolasb.com.ar/archivos/2010/08/vim-vigor-large.png"><img class="aligncenter size-medium wp-image-1053" title="vim-vigor-large" src="http://nicolasb.com.ar/archivos/2010/08/vim-vigor-large-120x300.png" alt="" width="120" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2011/12/vim-tip-converting-to-a-beamer-frame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim: Ni! Ni! Ni! Ni!</title>
		<link>http://nicolasb.com.ar/2011/06/vim-ni-ni-ni-ni/</link>
		<comments>http://nicolasb.com.ar/2011/06/vim-ni-ni-ni-ni/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 10:00:02 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Vim Tips]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=1314</guid>
		<description><![CDATA[Type :Ni! in Vim and be amazed, it'll reply back: Do you demand a shrubbery?]]></description>
			<content:encoded><![CDATA[<p>Even though I have vim a Vim fan for a long time there still is a lot of stuff which amazes me about this little editor,  and this thing I last learned about it is in the &#8220;ZOMG that&#8217;s so cool I&#8217;m about to pee my pants&#8221; category. Unfortunately, if I were to draw a Venn diagram of the people who may find it cool I&#8217;d have to intersect the group of people reading my blog (yes, very small) with the group of people who like Vim and Monty Python. So, here&#8217;s to the null group:</p>
<p>Type <strong>:Ni!</strong> in Vim and be amazed, it&#8217;ll reply back: <strong>Do you demand a shrubbery?</strong></p>
<p><a href="http://www.imdb.com/title/tt0071853/">Just how cool is that?</a></p>
<p><a href="http://nicolasb.com.ar/archivos/2011/04/Knightni.jpg"><img class="aligncenter size-medium wp-image-1417" title="Knightni" src="http://nicolasb.com.ar/archivos/2011/04/Knightni-300x165.jpg" alt="" width="300" height="165" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2011/06/vim-ni-ni-ni-ni/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Vim Tip: Vigor</title>
		<link>http://nicolasb.com.ar/2011/02/vim-tip-vigor/</link>
		<comments>http://nicolasb.com.ar/2011/02/vim-tip-vigor/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 10:00:29 +0000</pubDate>
		<dc:creator>nico</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Vim Tips]]></category>
		<category><![CDATA[WTF]]></category>

		<guid isPermaLink="false">http://nicolasb.com.ar/?p=856</guid>
		<description><![CDATA[Oh man. Just do a search on google images for Vim + Vigor. There are so many WTF images to choose from, I just can&#8217;t decide. Apparently since Vim is the name of sexual enhancement drug or something like that, combining Vim and Vigor is a formula for fun. Well, Vim and Vigor have a [...]]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td>Oh man. Just do a search on google images for Vim + Vigor. There are so many WTF images to choose from, I just can&#8217;t decide. Apparently since Vim is the name of sexual enhancement drug or something like that, combining Vim and Vigor is a formula for fun.</p>
<p>Well, Vim and Vigor have a different meaning in Linux. Just do an apt-get install vigor, then run it. You&#8217;ll have lots of fun with Vim&#8217;s evil cousing, I promise.</td>
<td><a href="http://nicolasb.com.ar/archivos/2010/08/vim-vigor-large.png"><img class="aligncenter size-full wp-image-1053" title="vim-vigor-large" src="http://nicolasb.com.ar/archivos/2010/08/vim-vigor-large.png" alt="" width="156" height="390" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://nicolasb.com.ar/2011/02/vim-tip-vigor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
	</channel>
</rss>

