<?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>Yan Pritzker</title>
	<atom:link href="http://yanpritzker.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanpritzker.com</link>
	<description>photographer, entrepreneur, software engineer, musician, skier</description>
	<lastBuildDate>Sat, 21 Jan 2012 01:18:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<atom:link rel="next" href="http://yanpritzker.com/feed/?page=2" />

		<item>
		<title>The cleanest vimrc you&#8217;ll ever see</title>
		<link>http://yanpritzker.com/2012/01/20/the-cleanest-vimrc-youve-ever-seen/</link>
		<comments>http://yanpritzker.com/2012/01/20/the-cleanest-vimrc-youve-ever-seen/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 17:02:51 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=446</guid>
		<description><![CDATA[So many of us use vimrc files that are a frankenstein&#8217;s monster, cobbled together from spare parts, gists, and snippets from wikis. One day I decided I was no longer going to treat my vimrc as a garbage dump. As programmers, we strive toward well factored code, so why do we accept such ugly vimrc&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>So many of us use vimrc files that are a frankenstein&#8217;s monster, cobbled together from spare parts, gists, and snippets from wikis. One day I decided I was no longer going to treat my vimrc as a garbage dump. As programmers, we strive toward well factored code, so why do we accept such ugly vimrc&#8217;s that are impossible to understand, and even worse impossible to share because of their complexity. Let&#8217;s stop the insanity! It turns out it&#8217;s very easy&#8230;</p>
<p>Since vim automatically loads everything in ~/.vim/plugin/, you can just add a directory like ~/.vim/plugin/settings and put each semantic piece in its own snippet. Put your keymaps in ~/.vim/plugin/settings/keymap.vim. Put your visual setup like font and colors into ~/.vim/plugin/settings/gui.vim, etc. </p>
<p>After I did this, I ended up with a vimrc that&#8217;s only about 90 lines long including very detailed comments about every section. </p>
<p>I think this is the <a href="https://github.com/skwp/dotfiles/blob/master/vimrc">cleanest vimrc you&#8217;ll see on the web.</a> All my <a href="https://github.com/skwp/dotfiles/tree/master/vim/plugin/settings">vim plugin settings are broken down into individual files</a>, following a convention of one file per vim plugin that I use, plus some extra ones that are too small to be plugins. </p>
<p><strong>Think your vimrc is better? Show me! I want to learn :)</strong> </p>
<p>My vimrc and the rest of my vim setup is available as part of my <a href="http://github.com/skwp/dotfiles">YADR (Yet Another Dotfiles Repo) project</a>. Come check it out, I need alpha testers!</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/01/20/the-cleanest-vimrc-youve-ever-seen/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Convert rspec pending to xit with vim</title>
		<link>http://yanpritzker.com/2012/01/03/convert-rspec-pending-to-xit-with-vim/</link>
		<comments>http://yanpritzker.com/2012/01/03/convert-rspec-pending-to-xit-with-vim/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 17:52:31 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[rspec]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=434</guid>
		<description><![CDATA[RSpec has two ways of disabling tests: pending and xit. Except one of them is truly evil. Pending actually still runs the before block even when it&#8217;s disabled. This is bad when you have a test with a very expensive before block. Changing the pending to xit is a great strategy, but tedious. Vimscript to [...]]]></description>
			<content:encoded><![CDATA[<p>RSpec has two ways of disabling tests: pending and xit. Except one of them is truly evil. Pending actually still runs the before block even when it&#8217;s disabled. This is bad when you have a test with a very expensive before block. Changing the pending to xit is a great strategy, but tedious. Vimscript to the rescue! The functionality is available as part of my dotfiles repo, but you can just <a href="https://raw.github.com/skwp/dotfiles/master/vim/plugin/settings/rspec_pending_to_xit.vim">grab the script by itself</a> and type <em>,rxit</em> to use it on a file. </p>
<p>For more awesomeness, check out my dotfiles repo called <a href="http://github.com/skwp/dotfiles">YADR (Yet Another Dotfiles Repo)</a>, featuring 100% clean vimrc with all custom keymapping done in well factored scripts inside vim/plugin/settings, and a list of plugins perfectly tailored for Rails development, currently in alpha preview.</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2012/01/03/convert-rspec-pending-to-xit-with-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn to speak vim &#8211; verbs, nouns, and modifiers!</title>
		<link>http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-nouns-and-modifiers/</link>
		<comments>http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-nouns-and-modifiers/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 17:30:32 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=409</guid>
		<description><![CDATA[.vim strong { font-size: 120%; background: lightyellow; } .vim code { background: #eee; padding: 0.5em; margin-top:1em; display:block } Using vim is like talking to your editor in &#8216;verb modifier object&#8217; sentences, turned into acronyms learn some verbs: v (visual), c (change), d (delete), y (yank/copy). these are the most important. there are others learn some [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css" media="screen">
  .vim strong { font-size: 120%; background: lightyellow; }
  .vim code { background: #eee; padding: 0.5em; margin-top:1em; display:block }
</style>
<p>Using vim is like talking to your editor in &lsquo;verb modifier object&rsquo; sentences, turned into acronyms</p>
<ul class='vim'>
<li>learn some verbs: <strong>v</strong> (visual), <strong>c</strong> (change), <strong>d</strong> (delete), <strong>y</strong> (yank/copy). these are the most important. there are others</li>
<li>learn some modifiers: <strong>i</strong> (inside), <strong>a</strong> (around), <strong>t</strong> (till..finds a character), <strong>f</strong> (find..like till except including the char), <strong>/</strong> (search..find a string/regex)</li>
<li>learn some text objects: <strong>w</strong> (word), <strong>s</strong> (sentence) <strong>p</strong> (paragraph) <strong>b</strong> (block/parentheses), <strong>t</strong> (tag, works for html/xml) there are others</li>
</ul>
<p><strong>To move efficiently in vim,</strong> don&rsquo;t try to do anything by pressing keys many times, instead speak to the editor in sentences</p>
<ul>
<li>delete the current word: diw (delete inside word)</li>
<li>change current sentence: cis (change inside sentence)</li>
<li>change a string inside quotes: ci&rdquo; (change inside quote)</li>
<li>change until next occurrence of &#8216;foo&#8217;: c/foo (change search foo)</li>
<li>change everything from here to the letter X: ctX</li>
<li>visually select this paragraph: vap (visual around paragraph)</li>
</ul>
<p>If you understand the verbs and objects you&rsquo;re dealing with, you will soon realize that adding a new plugin and learning a new verb or noun exponentially increases your productivity, as you can now apply it in all the sentences you already know. It&rsquo;s just like learning a language. </p>
<h4>Let&#8217;s add some new text object plugins!</h4>
<ul>
<li>install surround.vim: <a href="https://github.com/tpope/vim-surround">vim-surround</a>- you get a new noun, the &lsquo;surround&rsquo; (s or S)
<ul>
<li>visually select a word and surround it with quotes: viwS&rdquo;</li>
<li>change surround from single quote to double quote: cs&rsquo;&rdquo;</li>
</ul>
</li>
<li>install <a href="https://github.com/nelstrom/vim-textobj-rubyblock" title="vim-textobj-rubyblock">vim-textobj-rubyblock</a> &#8211; you get a new noun, the &lsquo;ruby block&rsquo; (r)
<ul>
<li>delete current ruby block: dir (delete inside ruby block)</li>
<li>visually select a ruby function: var (visual around ruby block)</li>
<li>visually select the innards of a function: vir (visual inside ruby block)</li>
</ul>
</li>
<li>install <a href="https://github.com/tomtom/tcomment_vim">tComment</a> &#8211; new verb: &#8220;gc&#8221; (go comment)</li>
<ul>
<li>comment the current ruby method: gcar (go comment around ruby)</li>
</ul>
</ul>
<p>Now go out and learn a new verb or noun every day!</p>
<h4>Resources and Further Reading</h4>
<ul>
<li><a href="http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-guide">Vim Text Objects, Definitive Guide</a>, a great blog post!</a></li>
<li>Want an exceptionally curated collection of the best plugins vim has to offer? Check out an early beta preview of my <a href="http://github.com/skwp/dotfiles">fully modularized vim/dotfile setup called YADR (Yet Another Dotfile Repo)</a> which includes text object plugins for ruby blocks(r), indents(i), dates(da/df), function arguments(a), and ruby symbols(:)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-nouns-and-modifiers/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Vim demystified: ten commands you can start using today</title>
		<link>http://yanpritzker.com/2011/11/30/vim-demystified-ten-commands-you-can-start-using-today/</link>
		<comments>http://yanpritzker.com/2011/11/30/vim-demystified-ten-commands-you-can-start-using-today/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 15:01:38 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[productivity]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=375</guid>
		<description><![CDATA[.vimtable { text-align: left; width: 600px; border: 1px solid #aaa; margin-bottom: 1em } .vimtable td,th { padding: 1em; } .vimtable tr td {border-bottom: 1px solid #ddd } .vimtable tr.last td { border-bottom: none} .vimtable td.first { font-weight: bold; font-size: 120%; } .vimtable strong { font-size: 120%; background: lightyellow; } .vimtable tr.warning td { background: #ffffcc; [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css" media="screen">
  .vimtable { text-align: left; width: 600px; border: 1px solid #aaa; margin-bottom: 1em }
  .vimtable td,th { padding: 1em; }
  .vimtable tr td {border-bottom: 1px solid #ddd  }
  .vimtable tr.last td { border-bottom: none}
  .vimtable td.first { font-weight: bold; font-size: 120%; }
  .vimtable strong { font-size: 120%; background: lightyellow; }
  .vimtable tr.warning td { background: #ffffcc; color: #1E1E1A}
  .vimtable code { background: #eee; padding: 0.5em; margin-top:1em; display:block }
</style>
<p>These commands are not only extremely useful but also mnemonic and easy to learn for a huge payoff in keystroke savings. These are the common compound commands I use every day, and I think it&#8217;s easier to dive in this way than to try to learn vim key by key. </p>
<table class="vimtable">
<tr class='warning'>
<td colspan='100%'>Read Me First! <a href='http://dailyvim.blogspot.com/2008/04/ways-to-avoid-esc-key.html'>Save your wrists, stop using ESC in vim</a></td>
</tr>
<tr>
<td class="first">yaw</td>
<td>
    <strong>y</strong>ank <strong>a</strong>round <strong>w</strong>ord &#8211; copy the current word, no matter where your cursor is inside the word</p>
</td>
</tr>
<tr>
<td class="first">ci&#8221;</td>
<td><strong>c</strong>hange <strong>i</strong>nside quote (or any other enclosure). Example: <strong>ci(</strong> to change something surrounded by parentheses. But what&#8217;s <em>really cool</em> is that you can invoke this from anywhere inside a line of code, so even if the string you want to change is far away, typing <strong>ci&#8221;</strong> will put your right inside the string, ready to change it.</td>
</tr>
<tr>
<td class="first">ctX</td>
<td>
      <strong>c</strong>hange <strong>t</strong>ill <strong>X</strong> (any character); and in general the use of <strong>tX</strong> where X is any character, to move to that character. You can combine the motion with another command such as <strong>dtX</strong> (delete till X), <strong>ytX</strong> (yank till X), or <strong>vtX</strong> (visually select till X).</p>
</td>
</tr>
<tr>
<td class="first">gf</td>
<td>
<p>      <strong>g</strong>o to <strong>f</strong>ile &#8211; open the file under the cursor (useful for traversing file references inside codebases)
    </td>
</tr>
<tr>
<td class="first">* (Shift-8)</td>
<td>Takes you to the next occurrance of the word you&#8217;re currently looking at (often the best way to navigate to the definition of a method, if witin the same file)</td>
</tr>
<tr>
<td class="first">Ctrl-6</td>
<td>Jumps you back to the previous file you were editing. I use this so often I remapped it to just the capital letter Z:<br />
      <code> nnoremap &lt;silent&gt; Z &lt;C-^&gt;</code>
    </td>
</tr>
<tr>
<td class="first">Ctrl-]</td>
<td>
<p>
        Again, immensly useful for traversing codebases, this command relies on exuberant ctags (<a href="http://www.thegeekstuff.com/2009/04/ctags-taglist-vi-vim-editor-as-sourece-code-browser/">set up ctags</a>) to take you to method and class definitions. I remap this to simply capital <strong>F</strong>:
      </p>
<p>      <code>nnoremap &lt;silent&gt; F &lt;C-]&gt;</code></p>
<p>
        I believe all highly used commands should be a single letter, as close as possible to home row.
    </p>
</td>
</tr>
<td class="first">mX<br/>&#8216;X</td>
<td>
<p>
        You can bookmark a file very quickly by using <strong>m</strong> plus any capital letter. Then to go back to the file at any time, hit <strong>&#8216;</strong> and the same letter again.
      </p>
</td>
<tr class='warning'>
<td colspan='100%'>The commands in this section are based on custom aliases. Please check that the alias doesn&#8217;t overload a key you&#8217;re used to.</td>
</tr>
<tr>
<td class="first">K</td>
<td>
      For super fast code navigation, nothing beats the <A href="https://github.com/tjennings/git-grep-vim">git grep </a>plugin combined with an alias to grep the <strong>K</strong>urrent word under the cursor:</p>
<p>          <code>nnoremap &lt;silent&gt; K :GitGrep &lt;cword&gt;&lt;CR&gt;</code>
    </td>
</tr>
<tr>
<td class="first">vv<br/>ss</td>
<td>
      Splitting windows is a common and every day task, so you shouldn&#8217;t spend extra time typing to do so. Just double tap <strong>vv</strong> or <strong>ss</strong>:<br />
      <code>nnoremap &lt;silent&gt; vv &lt;C-w&gt;v<br/>nnoremap &lt;silent&gt; ss &lt;C-w&gt;s</code>
    </td>
</tr>
<tr class='last'>
<td class="first">Window navigation using J,K,I,M</td>
<td><em>Bonus:</em> A very common task for which the default key bindings involve way too many keystrokes. Use directional style keys to move between windows:<br />
      <code>nnoremap &lt;silent&gt; H &lt;C-w&gt;h<br />
      nnoremap &lt;silent&gt; L &lt;C-w&gt;l<br />
      nnoremap &lt;silent&gt; I &lt;C-w&gt;k<br />
      nnoremap &lt;silent&gt; M &lt;C-w&gt;j</code>
    </td>
</tr>
</table>
<div style='background:#eee; width:600px; margin-top:1em; margin-bottom:1em'>
<p style='margin: 1em;'>
If you liked this post, you might want to watch <a href="http://github.com/skwp/dotfiles">my dotfiles repo on github</a>. My dotfiles follow a keystroke minimizing principle where all common tools are only a few characters long, and are in the process of being cleaned up in order to release as a product targeting keystroke saving enthusiasts (this is especially important for those concerned with RSI prevention).
</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/11/30/vim-demystified-ten-commands-you-can-start-using-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails plugin: view a tree of all your partials</title>
		<link>http://yanpritzker.com/2011/11/21/rails-view-a-tree-of-all-your-partials/</link>
		<comments>http://yanpritzker.com/2011/11/21/rails-view-a-tree-of-all-your-partials/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 15:48:28 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=372</guid>
		<description><![CDATA[Trying to refactor your views? Too many partials got you down? Let PartialMap help! Draws an ascii or html tree of all your views and the partials that they reference. The tool is very simple and has a plugin formatter architecture so you can create formatters for other views. Please fork and contribute, or just [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to refactor your views? Too many partials got you down? Let PartialMap help! Draws an ascii or html tree of all your views and the partials that they reference. The tool is very simple and has a plugin formatter architecture so you can create formatters for other views. Please fork and contribute, or just enjoy as is: <a href="https://github.com/skwp/PartialMap">PartialMap on github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/11/21/rails-view-a-tree-of-all-your-partials/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dotfiles for insane productivity in bash, git, and vim</title>
		<link>http://yanpritzker.com/2011/11/17/dotfiles-for-ultimate-productivity-in-bash-and-vim/</link>
		<comments>http://yanpritzker.com/2011/11/17/dotfiles-for-ultimate-productivity-in-bash-and-vim/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 22:59:57 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=356</guid>
		<description><![CDATA[Following the principles of insane productivity that I blogged about earlier, I am releasing my dotfile repository, containing customizations for bash, git, and vim. The guiding principles are two letter mnemonics for everything bash and git related, and single letter capital letter actions for all common Vim commands. The selection of vim plugins is best [...]]]></description>
			<content:encoded><![CDATA[<p>Following the principles of <a href="http://yanpritzker.com/2006/10/03/five-ways-to-get-insane-productivity-boosts/">insane productivity</a> that I blogged about earlier, I am releasing my <a href="http://github.com/skwp/dotfiles">dotfile repository</a>, containing customizations for bash, git, and vim.</a> The guiding principles are two letter mnemonics for everything bash and git related, and single letter capital letter actions for all common Vim commands. The selection of vim plugins is best of breed for navigation, color highlighting, and git integration. The vim setup is optimized for rails and git development. The vimrc contains my custom single-letter aliases and is pretty well commented, so that you can easily take or reject my modifications as you need. and I will continue to clean up the repo and move everything into tpope&#8217;s pathogen plugin format over time. Enjoy and please send feedback!</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/11/17/dotfiles-for-ultimate-productivity-in-bash-and-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vim/rails/git: find references to current partial</title>
		<link>http://yanpritzker.com/2011/10/31/vimrailsgit-find-references-to-current-partial/</link>
		<comments>http://yanpritzker.com/2011/10/31/vimrailsgit-find-references-to-current-partial/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 16:34:57 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=344</guid>
		<description><![CDATA[Update 12/15/2011: Released as a plugin on github Blazing fast way of finding references to the current partial you&#8217;re viewing using this simple script. Requires git-grep.vim. Bonus: at the bottom of the script I also define &#8220;K&#8221; to git grep the current word. Very handy for fast function reference finding. Like this post? Here are [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update 12/15/2011: Released as a plugin <a href="https://github.com/skwp/vim-git-grep-rails-partial">on github</a></strong></p>
<p>Blazing fast way of finding references to the current partial you&#8217;re viewing using this simple script. Requires <a href="https://github.com/tjennings/git-grep-vim">git-grep.vim</a>. Bonus: at the bottom of the script I also define &#8220;K&#8221; to git grep the current word. Very handy for fast function reference finding.</p>
<p><script src="https://gist.github.com/1327904.js?file=git_grep_partial.vim"></script></p>
<p>Like this post? Here are some more you might enjoy:</p>
<ul>
<li><a href="http://yanpritzker.com/2006/10/03/five-ways-to-get-insane-productivity-boosts/">Five ways to get insane productivity boosts</a></li>
<li><a href="http://yanpritzker.com/2011/10/26/colorful-vim-ruby-tests-and-debugging/">Colorful ruby tests and debugging</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/10/31/vimrailsgit-find-references-to-current-partial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Colorful Vim Ruby Tests and Debugging</title>
		<link>http://yanpritzker.com/2011/10/26/colorful-vim-ruby-tests-and-debugging/</link>
		<comments>http://yanpritzker.com/2011/10/26/colorful-vim-ruby-tests-and-debugging/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 17:07:53 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=286</guid>
		<description><![CDATA[Update 12/15/2011: released as a plugin on github Bet your TextMate can&#8217;t do this! Screenshot first, how-to follows :) And now the how-to&#8230; ConqueTerm for a color-enabled embedded vim terminal ConqueTerm is pretty magical. It gives you an embedded shell where you can run bash, rib, rake, really..you name it. All with full ansi color [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update 12/15/2011: released as a plugin <a href="https://github.com/skwp/vim-ruby-conque">on github</a></strong></p>
<p>Bet your TextMate can&#8217;t do this! Screenshot first, how-to follows :)</p>
<p><a href="http://i.imgur.com/dhM1z.png"><img src="http://i.imgur.com/dhM1z.png" style='width:400px'/></a></p>
<p>And now the how-to&#8230;</p>
<h3>ConqueTerm for a color-enabled embedded vim terminal</h3>
<p>ConqueTerm is pretty magical. It gives you an embedded shell where you can run bash, rib, rake, really..you name it. All with full ansi color support. This lets us run red green tests that actually look green and not as a bunch of ansi escape codes.</p>
<ul>
<li><a href="http://code.google.com/p/conque/">Homepage</a></li>
<li><a href="http://conque.googlecode.com/files/conque_2.3.vmb">Direct Download Link</a></li>
<li>Install: follow directions on homepage or just <code>:so conque_2.3.vmb</code> from vim and restart</li>
</ul>
<h3>Setting up aliases for running bash, rails console, and irb</h3>
<p>Put this snippet into your .vimrc. This will give you a few aliases to use in vim:</p>
<ul>
<li><code>\r</code> for <strong>r</strong>uby on the current file as a ruby executable (great for unit tests)</li>
<li><code>\R</code> for <strong>R</strong>ake, great for running the entire test suite</li>
<li><code>\S</code> for R<strong>S</strong>pec on the current file</li>
<li><code>\i</code> for <strong>i</strong>rb (actually pry)</li>
<li><code>\c</code> for the Rails <strong>c</strong>onsole </li>
<li><code>\b</code> for <strong>b</strong>ash</li>
<li><code>\e</code> to <strong>e</strong>valuate the current selection in the already open console</li>
</ul>
<p><script src="https://gist.github.com/1316994.js"> </script></p>
<p>To get your tests to run red and green, <code>gem install redgreen</code> and <code>require 'redgreen'</code> in your test helper. By using the above <code>\r</code> alias with your ruby files, you will now see the output of your red green tests inside the colorized ConqueTerm. You can also run rspec colorized in ConqueTerm.</p>
<h3>Variable inspection and debugging with Pry</h3>
<p><code>gem install pry</code> is one of the most brilliant and useful things I&#8217;ve seen. Simply by requiring this gem in your code and then adding a <code>binding.pry</code> in the spot where you want to break, you will be dumped into a very nice (and again colorized if you use the ConqueTerm) debugging context where you can inspect any variable by simply typing its name. </p>
<p>The other cool thing is that Pry lets you treat your code like a filesystem (try <code>ls</code> and <code>cd [varname]</code> to dive into complex objects). Try it out! You can also use pry as an irb substitute. Simply type <code>pry</code> at the bash command line, or use <code>script/console --irb=pry</code> with your Rails 2.x project. Here is an <a href="https://github.com/pry/pry/wiki/Setting-up-Rails-to-use-Pry">page on pry&#8217;s github site on how to set it up in other environments</a>. </p>
<p>Pry does <a href="https://github.com/pry/pry/wiki">a whole ton more</a> including the ability to create &#8216;macros&#8217; in your irb, but that&#8217;s a whole different post. </p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/10/26/colorful-vim-ruby-tests-and-debugging/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Git Workflows Book</title>
		<link>http://yanpritzker.com/2011/10/12/git-workflows-book/</link>
		<comments>http://yanpritzker.com/2011/10/12/git-workflows-book/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 21:54:39 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/2011/10/12/git-workflows-book/</guid>
		<description><![CDATA[About a year ago, I was working with PeepCode to create a Git Workflows screencast based on a short git workflows book that I had written, a no-nonsense guide to using git for remote collaboration. Unfortunately I had to abandon the project due to lack of time, but the book remains alive, and is more [...]]]></description>
			<content:encoded><![CDATA[<p>About a year ago, I was working with PeepCode to create a Git Workflows screencast based on a short git workflows book that I had written, a no-nonsense guide to using git for remote collaboration.  </p>
<p>Unfortunately I had to abandon the project due to lack of time, but the book remains alive, and is more or less accurate to the current version of git:</p>
<p>Please enjoy the book for free: <a href="http://yanpritzker.com/git-book/">The Git Workflows Book</a> and feel free to comment on that page with your own thoughts, corrections, and favorite workflows.</p>
<p>Update: the url to the book is updated to a nicer format and ability to leave comments.</p>
<p>Update 2: I am mentioned on the <a href="http://ruby5.envylabs.com/">Ruby 5 podcast</a>! Thanks guys :) </p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/10/12/git-workflows-book/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>@SouthwestAir software engineers, you can do better</title>
		<link>http://yanpritzker.com/2011/02/17/southwestair-software-engineers-you-can-do-better/</link>
		<comments>http://yanpritzker.com/2011/02/17/southwestair-software-engineers-you-can-do-better/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 20:33:41 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[customer service]]></category>

		<guid isPermaLink="false">http://yanpritzker.com/?p=250</guid>
		<description><![CDATA[@SouthwestAir, thank you for taking the time to call me today to explain that my phone-based reservation will not show up in my online Rewards account. However, since the reservation is accessible online by searching for it via the PNR, and I can see on that page that it has my Rewards account number on [...]]]></description>
			<content:encoded><![CDATA[<p>@SouthwestAir, thank you for taking the time to call me today to explain that my phone-based reservation will not show up in my online Rewards account. However, since the reservation is accessible online by searching for it via the PNR, and I can see on that page that it has my Rewards account number on it, why can&#8217;t you get it to show up in my Rewards account when I am logged in? I&#8217;m sure the answer has something to do with legacy systems, incompatible databases, grumble, grumble, etc. But is it that hard to do one extra query into your legacy system and pull out those records? You have my rewards number, the records are clearly there. So what&#8217;s stopping you? Is the legacy system not indexed by rewards number (ok, this is possible, but how hard is it to add?). I wonder if someone from Southwest engineering department might read this and give me an answer that makes any sense. All you need to do is expose a &#8220;find reservations by rewards number&#8221; feature for the old phone-based database and you&#8217;re basically there. This can&#8217;t be that hard.</p>
<p>P.S. Please don&#8217;t take this the wrong way, I still love you and you are the only airline I will fly in the US. I am just curious what engineering roadblocks there are to getting this done?</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2011/02/17/southwestair-software-engineers-you-can-do-better/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.370 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-07 03:22:17 -->

