<?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>R James Taylor<title>&#187; Guest Articles</title>
</title>
	<atom:link href="http://www.rjamestaylor.com/category/guests/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rjamestaylor.com</link>
	<description>Unboxed: technology, customer service, satire, opinion</description>
	<lastBuildDate>Thu, 09 Sep 2010 01:01:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<script type="text/javascript">
if (typeof Meebo == "undefined") {
Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)};
(function(q){

	var args = arguments;
	if (!document.body) { return setTimeout(function(){ args.callee.apply(this, args) }, 100); }
	var d=document, b=d.body, m=b.insertBefore(d.createElement('div'), b.firstChild); s=d.createElement('script');
	m.id='meebo'; m.style.display='none'; m.innerHTML='<iframe id="meebo-iframe"></iframe>';
	s.src='http'+(q.https?'s':'')+'://'+(q.stage?'stage-':'')+'cim.meebo.com/cim/cim.php?network='+q.network;
	b.insertBefore(s, b.firstChild);

})({network:'rjamestaylor_fu01he'});	}</script>	<item>
		<title>Disaster Recovery Planning for Zombie Attacks</title>
		<link>http://www.rjamestaylor.com/disaster-recovery-planning-for-zombie-attacks/</link>
		<comments>http://www.rjamestaylor.com/disaster-recovery-planning-for-zombie-attacks/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 17:40:55 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Guest Articles]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=633</guid>
		<description><![CDATA[A friend of mine sent out a call for help in formulating a disaster recovery plan (DRP) for our company in the event of a zombie outbreak. The following is my response.  This is very much an embryonic document; it needs a lot of work and I would welcome any contributions. When planning for a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fdisaster-recovery-planning-for-zombie-attacks%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fdisaster-recovery-planning-for-zombie-attacks%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>A friend of mine sent out a call for help in formulating a disaster recovery plan (DRP) for our company in the event of a zombie outbreak.</p>
<p>The following is my response.  This is very much an embryonic document; it needs a lot of work and I would welcome any contributions.</p>
<pre>When planning for a zombie attack it's important to have both strategic
and tactical plans.

Strategically we should consider survival, containment, eradication and
neutralization.

Survival is the primary strategy.  A zombie outbreak is a direct and
imminent threat to the life of every human being, and the only way to
contend with the threat is to survive.

Containment may be an effective strategy for outbreaks involving smaller
numbers of the undead.  Containment should be pursued over eradication
if at all possible because it gives the survivors the opportunity to
scrutinize and learn from the afflicted.  Containment will make identification
of the nature of the affliction much easier.

Neutralization and eradication are secondary strategies to survival.
It may be that a given outbreak can be neutralized, mitigating the threat;
absent the possibility of neutralization or effective containment, eradication
is the only remaining option.

We need to have tactical plans in place for a variety of possible
threats.  Zombie outbreaks are known to be caused by viruses and
possibly bacterial infections, occult sources, certain chemical
compounds, and extraterrestrial contacts (both sentient and
non-sentient).  Each cause produces zombies with different
characteristics.  Tactics for combating zombies produced through one
vector could be woefully ineffective against a different type of
zombie.  Some zombie states can be reversed while others require
containment or eradication of all effected individuals.

Weapon-wise it would be a good idea to have ready access to both
high-impact firearms and durable melee weapons.  Remember that to drop
any kind of zombie except an occult one it's necessary to destroy or
remove the brain, and by 'brain' we're not talking about the cerebrum
but the cerebellum.  The cerebellum is only 10% of the human brain and
it's a lot harder to target it with a small-caliber firearm than one
would think.  Shotguns are probably the best bet for a number of reasons
- they are not precision weapons, they have good slowing/stopping power
even if they don't remove the head, and they have a low incidence of
ricochets in closed areas.  I think machetes, axes and shovels are ideal
for hand-to-hand combat, as are clubs, maces and of course cricket bats.

Food supplies need to be set up well in advance.  We should all be
prepared to survive for an extended time on MREs.  Local secure
cultivation of fresh produce would be a good idea unless the zombie
vector is biological, chemical or extraterrestrial, in which case the
food could become a vector for spreading the outbreak.  We might want to
consider adding a closed hydroponic facility at each of our facilities.

Finally, I think that the emotional considerations of surviving a zombie
attack are often neglected.  We should have trained mediators and
counselors available in all locations.  The onset of paranoia and
depression can be just as lethal in a well-armed population as the
zombies themselves.  And the grim reality is that at some point, each
survivor is almost guaranteed to come face-to-vacant face with the
reanimated corpse of a former loved one.  The psychological damage that
such a confrontation may cause cannot be overstated.  We all like to
think that we're tough enough to survive such an encounter, but even the
toughest survivor should be ready and willing to accept help and be
prepared for the need for emotional healing.</pre>
<img style='display:none' id="post-633-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/disaster-recovery-planning-for-zombie-attacks/',title:'Disaster Recovery Planning for Zombie Attacks',tweet:' 			 				 			 		 A friend of mine sent out a call for help in formulating a disaster recovery plan (',description:' 			 				 			 		 A friend of mine sent out a call for help in formulating a disaster recovery plan ('})"><script type='text/javascript'>document.getElementById("post-633-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/disaster-recovery-planning-for-zombie-attacks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Caveat Emptor: x-tremegeek.com</title>
		<link>http://www.rjamestaylor.com/caveat-emptor/</link>
		<comments>http://www.rjamestaylor.com/caveat-emptor/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 19:01:38 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Customer Service]]></category>
		<category><![CDATA[Guest Articles]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=620</guid>
		<description><![CDATA[My girlfriend wanted to give me an awesome geek toy for Christmas this year.  She ordered a USB Webcam Missile Launcher from x-tremegeek.com for me, which I have to say is a pretty darned awesome geek toy.  Even now, I can imagine using it to drive invaders from my cubicle, guaranteeing the sovereignty of my [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fcaveat-emptor%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fcaveat-emptor%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>My girlfriend wanted to give me an awesome geek toy for Christmas this year.  She ordered a USB Webcam Missile Launcher from <a href="http://www.x-tremegeek.com" target="_blank">x-tremegeek.com</a> for me, which I have to say is a pretty darned awesome geek toy.  Even now, I can imagine using it to drive invaders from my cubicle, guaranteeing the sovereignty of my personal space . . .</p>
<p>Alas, it is not to be.</p>
<p>When the toy arrived at her home, she opened it up and found not the <a title="Ordered gift" href="http://www.x-tremegeek.com/templates/SearchDetail.asp?productID=20782&amp;core_cross=SEARCH_DETAIL_COMPARISON" target="_blank">USB Webcam Missile Launcher</a>, but rather the <a title="Substituted gift - NOT ordered" href="http://www.x-tremegeek.com/templates/SearchDetail.asp?productID=13430&amp;core_cross=SEARCH_DETAIL_COMPARISON" target="_blank">USB Missile Launcher</a>.  No webcam.  Which is still a cool toy, but it lacks the major feature of the webcam version, which is that it can be remotely controlled.</p>
<p>But the folks at x-tremegeek.com explained to her that the webcam version was on sale for the same price as the normal retail price of the non-webcam version, so this was an &#8220;appropriate substitution&#8221;.  When she pointed out that they are, in fact, very different products, x-tremegeek.com said that she could return the thing that she did not order for a refund &#8211; minus a restocking fee.  After several phone calls, she got them to waive the restocking fee.  Since, you know, she was returning something that she <strong>didn&#8217;t order in the first place</strong>.</p>
<p>x-tremegeek.com has many things going for it as a company.  It&#8217;s got an apt name, a great catalog of toys, and a decent web site.  Unfortunately, their customer service is bollocks.  When the zombies finally overrun my meager cubicle defenses, I will die cursing their name.</p>
<img style='display:none' id="post-620-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/caveat-emptor/',title:'Caveat Emptor: x-tremegeek.com',tweet:' 			 				 			 		 My girlfriend wanted to give me an awesome geek toy for Christmas this year.  She ',description:' 			 				 			 		 My girlfriend wanted to give me an awesome geek toy for Christmas this year.  She '})"><script type='text/javascript'>document.getElementById("post-620-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/caveat-emptor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>noVIMber: VIM support for scripting languages</title>
		<link>http://www.rjamestaylor.com/novimber-vim-support-for-scripting-languages/</link>
		<comments>http://www.rjamestaylor.com/novimber-vim-support-for-scripting-languages/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 21:59:29 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=578</guid>
		<description><![CDATA[Thanks everyone for reading along. I hope you&#8217;ve enjoyed reading these tips as much as I&#8217;ve enjoyed writing them. For the last installment, I wanted to share a very cool feature in VIM that I am just beginning to learn how to use. VIM provides support for Perl, Python and Ruby so that you can [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-vim-support-for-scripting-languages%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-vim-support-for-scripting-languages%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Thanks everyone for reading along.  I hope you&#8217;ve enjoyed reading these<br />
tips as much as I&#8217;ve enjoyed writing them.</p>
<p>For the last installment, I wanted to share a very cool feature in VIM<br />
that I am just beginning to learn how to use.  VIM provides support for<br />
Perl, Python and Ruby so that you can use these languages to create<br />
functions in VIM.</p>
<p>I&#8217;m most familiar with Python myself, so here are a couple of examples.<br />
In VIM, try the following:</p>
<p><code>:python print "Hello world"</code></p>
<p>You&#8217;ll see &#8216;Hello world&#8217; show up in the status line at the bottom of the<br />
screen.  Cool, but not all that handy (though you can use this as a<br />
quick calculator, e.g. :<code>py print 256 * 8</code> ).</p>
<p>To actually get Python to do something interesting with the contents of<br />
your editor, you can define a VIM function that uses Python to do the<br />
heavy lifting.</p>
<p>Here&#8217;s how:<br />
<code>:function! PySort()<br />
python &lt;&lt; EOF<br />
import vim<br />
b = vim.buffers[0]<br />
x = b[:]<br />
x.sort()<br />
b[:] = x<br />
EOF<br />
endfunction</code></p>
<p>The<code> :function!</code> line begins a function definition.  VIM has its own<br />
internal scripting language, which is swell and all, but if you already<br />
have familiarity with one of the other supported languages, you can use<br />
that language to get a jump start on seriously tricking out VIM.</p>
<p>The line:</p>
<p><code>python &lt;&lt; EOF</code></p>
<p>tells VIM that we&#8217;re defining a block of Python code.  The block will<br />
end with the line &#8220;EOF&#8221;.  The enclosed lines are pure Python.</p>
<p>First, we import the vim module:</p>
<p><code>import vim</code></p>
<p>Now we have access to that module&#8217;s components, like the buffers[]<br />
list.  Just like in normal Python, buffers[] is zero-indexed, so<br />
buffers[0] is the first buffer.</p>
<p>Next, we copy the contents of b as a list into the variable x:</p>
<p><code>x = b[:]</code></p>
<p>Then we sort that list alphabetically:</p>
<p><code>x.sort()</code></p>
<p>Then we replace the current buffer with the sorted context of x:</p>
<p><code>b[:] = x</code></p>
<p>And voila &#8211; you can now sort the current buffer alphabetically by<br />
calling the PySort() function:</p>
<p><code>:call PySort()</code></p>
<p>This is just a trivial example, but hopefully it gives you some ideas of<br />
what can be done with Python (or Perl, or Ruby) inside of VIM.</p>
<p>To get more information about using scripts in VIM, try the following<br />
help commands in VIM:</p>
<p><code>:help python-vim</code><br />
<code>:help perl</code><br />
<code>:help perl-using</code><br />
<code>:help ruby-vim</code></p>
<p>Thank you all for reading.  Anyone interested in exploring any of the<br />
topics discussed in this or previous tips should feel free to <a href=http://twitter.com/druzziel>contact me</a>.</p>
<p>Happy VIMming!</p>
<p>- <a href=http://twitter.com/druzziel>David Roth</a></p>
<img style='display:none' id="post-578-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-vim-support-for-scripting-languages/',title:'noVIMber: VIM support for scripting languages',tweet:' 			 				 			 		 Thanks everyone for reading along.  I hope you&#8217;ve enjoyed reading these tips ',description:' 			 				 			 		 Thanks everyone for reading along.  I hope you&#8217;ve enjoyed reading these tips '})"><script type='text/javascript'>document.getElementById("post-578-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-vim-support-for-scripting-languages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>noVIMber: g wiz!</title>
		<link>http://www.rjamestaylor.com/novimber-g-wiz/</link>
		<comments>http://www.rjamestaylor.com/novimber-g-wiz/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 16:40:45 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=576</guid>
		<description><![CDATA[VIM&#8217;s got a lot of helpful commands that start with g. Not sure why g, of all letters, but there you are. One that I find really helpful when running through Apache configurations is gf. If you put your cursor over the path to a file and type: gf VIM will open up the file [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-g-wiz%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-g-wiz%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>VIM&#8217;s got a lot of helpful commands that start with <code>g</code>.  Not sure why <code>g</code>,<br />
of all letters, but there you are.</p>
<p>One that I find really helpful when running through Apache<br />
configurations is <code>gf</code>.  If you put your cursor over the path to a file<br />
and type:</p>
<p><code>gf</code></p>
<p>VIM will open up the file that&#8217;s under your cursor.  So, given a vhost<br />
like the following:</p>
<p><code>&lt;VirtualHost *:80&gt;<br />
DocumentRoot /var/www/html<br />
ServerName example.com<br />
&lt;/VirtualHost&gt;</code></p>
<p>If you put your cursor over /var/www/html and type <code>gf</code>, VIM will open up<br />
a directory listing of that directory.  Or, if you&#8217;ve piped the output<br />
of <code>httpd -S</code> to a file and you put your cursor over the path to a<br />
particular virtual host&#8217;s configuration file, you can open it up in the<br />
same way.  Note that if you&#8217;ve updated the current file and it hasn&#8217;t<br />
been written to disk yet, VIM will complain that the current file hasn&#8217;t<br />
been saved yet and <code>gf</code> will fail.</p>
<p>Another handy use of <code>g</code> is when you&#8217;re editing a file with wrapped<br />
lines.  Ever find yourself on a line that is wrapped, and you want to<br />
make a change that&#8217;s right below the cursor, so you type <code>j</code> or hit the<br />
down arrow, but the cursor skips right past what you want and goes to<br />
the next line?  Don&#8217;t you just HATE that?  Well, if you type <code>gj</code> or<br />
<code>g&lt;down arrow&gt;</code> instead, the cursor will move according to displayed<br />
lines, not logical lines.  Much better.</p>
<p>Finally, my favorite stupid VIM trick.  <code>g?</code> will ROT-13 text.  Use the<br />
<code>ggVG</code> sequence to highlight your entire file.  Then type:</p>
<p><code>g?</code></p>
<p>And presto &#8211; every alphabetic character is shifted 13 places to the<br />
right in the alphabet.  Quick and easy obfuscation.</p>
<p>Happy VIMming!</p>
<p>- David Roth</p>
<img style='display:none' id="post-576-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-g-wiz/',title:'noVIMber: g wiz!',tweet:' 			 				 			 		 VIM&#8217;s got a lot of helpful commands that start with g.  Not sure why g, of al',description:' 			 				 			 		 VIM&#8217;s got a lot of helpful commands that start with g.  Not sure why g, of al'})"><script type='text/javascript'>document.getElementById("post-576-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-g-wiz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>noVIMber: VIM Scripts</title>
		<link>http://www.rjamestaylor.com/novimber-vim-scripts/</link>
		<comments>http://www.rjamestaylor.com/novimber-vim-scripts/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 16:38:20 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=574</guid>
		<description><![CDATA[We went over creating VIM macros in a previous tip. If you save your macros to a file, you can have VIM run the macro against a file, effectively creating a batch mode for executing VIM macros. Let&#8217;s say that, for whatever reason, you want to convert a file to all lower case. Create a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-vim-scripts%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-vim-scripts%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>We went over creating VIM macros in a previous tip.  If you save your<br />
macros to a file, you can have VIM run the macro against a file,<br />
effectively creating a batch mode for executing VIM macros.</p>
<p>Let&#8217;s say that, for whatever reason, you want to convert a file to all<br />
lower case.  Create a file called lower.vim and put in the following lines:</p>
<p><code>ggVGu</code><br />
<code>:wq!</code></p>
<p>Make sure there are carriage returns at the end of each line.  Those<br />
commands will jump to the first line (<code>gg</code>), turn on visual highlighting<br />
mode (<code>V</code>), then jump to the last line (<code>G</code>).  The &#8216;<code>u</code>&#8216; command at the end of<br />
the first line will translate all highlighted characters to lower case.<br />
Then the next line writes and quits the file.</p>
<p>Now you can apply this script to any file with:</p>
<p><code>vim -s lower.vim /path/to/file</code></p>
<p>Maybe you want to translate all your XML files under the current<br />
directory to lower case.  In that case, you can combine VIM with &#8216;find&#8217;<br />
to do some quick batch processing:</p>
<p><code>find . -type f -name \*.xml -exec vim -s lower.vim {} \;</code></p>
<p>Note that when you use VIM in this way, VIM does not operate in the<br />
background.  An instance of VIM is started for each file being<br />
processed, and the commands in the script file are run like a macro.  If<br />
your script file makes a lot of complicated changes, this can be really<br />
amusing to watch.  I run this on my computer at home instead of having a<br />
fireplace.</p>
<p>Happy VIMming!</p>
<p>- David Roth</p>
<img style='display:none' id="post-574-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-vim-scripts/',title:'noVIMber: VIM Scripts',tweet:' 			 				 			 		 We went over creating VIM macros in a previous tip.  If you save your macros to a f',description:' 			 				 			 		 We went over creating VIM macros in a previous tip.  If you save your macros to a f'})"><script type='text/javascript'>document.getElementById("post-574-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-vim-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>noVIMber: Plugin Madness</title>
		<link>http://www.rjamestaylor.com/novimber-plugin-madness/</link>
		<comments>http://www.rjamestaylor.com/novimber-plugin-madness/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 16:35:54 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=572</guid>
		<description><![CDATA[VIM ships with a number of plugins, which are scripts that enhance VIM&#8217;s basic functionality. You&#8217;ll find the plugins that shipped with your copy of VIM in $VIMRUNTIME/plugin. (Sub-tip: don&#8217;t know where VIM is installed? In vim, type &#8220;:echo $VIMRUNTIME&#8220;.) We talked about syntax highlighting in an earlier tip. Syntax highlighting is great and it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-plugin-madness%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-plugin-madness%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>VIM ships with a number of plugins, which are scripts that enhance VIM&#8217;s<br />
basic functionality.  You&#8217;ll find the plugins that shipped with your<br />
copy of VIM in $VIMRUNTIME/plugin.</p>
<p>(Sub-tip: don&#8217;t know where VIM is installed?  In vim, type &#8220;<code>:echo<br />
$VIMRUNTIME</code>&#8220;.)</p>
<p>We talked about syntax highlighting in an earlier tip.  Syntax<br />
highlighting is great and it makes code more readable, but if you take<br />
your text file that&#8217;s all fancy in VIM and publish it on a web page<br />
somewhere, it goes back to dreary black text.</p>
<p>But it doesn&#8217;t have to.  With a syntax-highlighted file open, type:</p>
<p><code>ggVG</code></p>
<p>(that highlights the entire file)</p>
<p><code>:TOhtml</code></p>
<p>(that creates an HTML document of your highlighted file)</p>
<p>Cool, huh?</p>
<p>Another fun pair of plugins are gzip.vim and tarPlugin.vim.  These are<br />
great because you don&#8217;t have to do anything to activate them &#8211; just use<br />
VIM to open a .gz or .tar file (or, for that matter, a .tar.gz file).<br />
VIM will uncompress your gzipped file on the fly and re-compress it when<br />
you&#8217;re done editing it.  If you&#8217;re opening up a .tar file, VIM will give<br />
you a list of the files in the tarball.</p>
<p>Happy VIMming!</p>
<p>- David Roth</p>
<img style='display:none' id="post-572-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-plugin-madness/',title:'noVIMber: Plugin Madness',tweet:' 			 				 			 		 VIM ships with a number of plugins, which are scripts that enhance VIM&#8217;s basi',description:' 			 				 			 		 VIM ships with a number of plugins, which are scripts that enhance VIM&#8217;s basi'})"><script type='text/javascript'>document.getElementById("post-572-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-plugin-madness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>noVIMber: Automating tasks with VIM</title>
		<link>http://www.rjamestaylor.com/novimber-automating-tasks-with-vim/</link>
		<comments>http://www.rjamestaylor.com/novimber-automating-tasks-with-vim/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 16:34:50 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=570</guid>
		<description><![CDATA[VIM has a bunch of built-in event handlers which can be used to automate certain tasks. These are known as autocommands. You can define actions that get executed whenever one of these autocommands is fired to do things like read in a template file or write a note to a log file. In today&#8217;s tip, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-automating-tasks-with-vim%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-automating-tasks-with-vim%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>VIM has a bunch of built-in event handlers which can be used to automate<br />
certain tasks.  These are known as autocommands.  You can define actions<br />
that get executed whenever one of these autocommands is fired to do<br />
things like read in a template file or write a note to a log file.  In<br />
today&#8217;s tip, I&#8217;m going to show you how to use template files for certain<br />
file types.</p>
<p>Let&#8217;s say you write a lot of HTML code, and you always find yourself<br />
creating the following structure:</p>
<p>&lt;HTML&gt;<br />
&lt;HEAD&gt;&lt;TITLE&gt;&lt;/TITLE&gt;&lt;/HEAD&gt;<br />
&lt;BODY&gt;</p>
<p>&lt;/BODY&gt;<br />
&lt;/HTML&gt;</p>
<p>Instead of having to type that every single time you create a new .html<br />
file, you can write that structure into a template file.  In your home<br />
directory, there should be a .vim directory.  If there isn&#8217;t go ahead<br />
and create one, then create a directory called templates and write your<br />
template file under the name html.tpl.</p>
<p>Now, add the following line to your .vimrc:</p>
<p><code>:autocmd BufNewFile *.html 0r ~/.vim/templates/html.tpl</code></p>
<p>That line tells VIM that you&#8217;re defining a new autocommand that is to be<br />
executed when the BufNewFile action is triggered.  BufNewFile gets<br />
triggered every time a new file is created in vim.  In this case, if the<br />
new file&#8217;s name matches the pattern &#8220;*.html&#8221;, it&#8217;s going to read in the<br />
contents of ~/.vim/templates.html.tpl.  So now, if you type:</p>
<p><code>vim brandnewfile.html</code></p>
<p>VIM is going to create the new file and read in the contents of your<br />
HTML template.</p>
<p>One note about this tip &#8211; I have no idea what the 0 in &#8220;0r&#8221; is for.  If<br />
anyone knows why the zero is needed, please let me know.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.571em; margin-left: 0px; padding: 0px;">Happy VIMming!</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.571em; margin-left: 0px; padding: 0px;">- David Roth</p>
<img style='display:none' id="post-570-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-automating-tasks-with-vim/',title:'noVIMber: Automating tasks with VIM',tweet:' 			 				 			 		 VIM has a bunch of built-in event handlers which can be used to automate certain ta',description:' 			 				 			 		 VIM has a bunch of built-in event handlers which can be used to automate certain ta'})"><script type='text/javascript'>document.getElementById("post-570-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-automating-tasks-with-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>noVIMber: Seeing the unseeable with VIM</title>
		<link>http://www.rjamestaylor.com/novimber-seeing-the-unseeable-with-vim/</link>
		<comments>http://www.rjamestaylor.com/novimber-seeing-the-unseeable-with-vim/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 22:51:00 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=566</guid>
		<description><![CDATA[This is why ninjas are scared of VIM &#8211; it allows you to see that which cannot be seen.  This is a trick that I learned when editing a lot of Python code in a massive project.  As you may or may not know, in Python, whitespace is syntactically significant.  Indented lines are used to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-seeing-the-unseeable-with-vim%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-seeing-the-unseeable-with-vim%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>This is why ninjas are scared of VIM &#8211; it allows you to see that which<br />
cannot be seen.  This is a trick that I learned when editing a lot of<br />
Python code in a massive project.  As you may or may not know,<br />
in Python, whitespace is syntactically significant.  Indented lines are<br />
used to indicate the bodies of functions, classes, and loops.  Problems<br />
can arise when bothspaces and tabs are used for indentation, because<br />
Python doesn&#8217;t necessarily consider eight spaces to be the equivalent<br />
of two tabs, even though they may look the same to a human eye.</p>
<p>So when you have a file open in VIM and you want to view non-printing<br />
characters, you can turn on list mode to see non-printing characters:</p>
<p><code>:se list</code></p>
<p>With list mode enabled, tabs will appear as <code>^I</code>, carriage returns will<br />
appear as <code>^M</code>, etc.  To turn list mode off, type:</p>
<p><code>:se nolist</code></p>
<p>If you see a character and you&#8217;re not sure what it is, you can use<br />
another couple of tricks to view the ASCII value of the character.  Put<br />
your cursor on top of it and type:</p>
<p><code>ga</code></p>
<p>(Think &#8220;get ASCII&#8221;).  If you&#8217;re editing a UTF-8 file, the command is:</p>
<p><code>g8</code></p>
<p>Then you can look up the value at <a href="http://www.asciitable.com/">http://www.asciitable.com/</a> or<br />
<a href="http://www.utf8-chartable.de/">http://www.utf8-chartable.de/</a> to see what it is. (Unless you&#8217;ve memorized the ASCII and UTF-8 tables, in which case you&#8217;re probably an emacs user and not interested in these VIM tips anyway.)</p>
<p>Happy VIMming!</p>
<p>- David Roth</p>
<img style='display:none' id="post-566-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-seeing-the-unseeable-with-vim/',title:'noVIMber: Seeing the unseeable with VIM',tweet:' 			 				 			 		 This is why ninjas are scared of VIM &#8211; it allows you to see that which cannot',description:' 			 				 			 		 This is why ninjas are scared of VIM &#8211; it allows you to see that which cannot'})"><script type='text/javascript'>document.getElementById("post-566-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-seeing-the-unseeable-with-vim/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>noVIMber: This ain&#8217;t your momma&#8217;s undo</title>
		<link>http://www.rjamestaylor.com/novimber-this-aint-your-mommas-undo/</link>
		<comments>http://www.rjamestaylor.com/novimber-this-aint-your-mommas-undo/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 16:12:58 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=563</guid>
		<description><![CDATA[Like most modern applications, VIM has an undo/redo feature.  As you&#8217;re typing along, you might realize that you&#8217;ve made a mistake and you want to undo it.  This is easy.  In command mode, type: u and VIM will undo your latest changes.  If you decided that you really did mean to make those changes, type: [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-this-aint-your-mommas-undo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-this-aint-your-mommas-undo%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Like most modern applications, VIM has an undo/redo feature.  As you&#8217;re<br />
typing along, you might realize that you&#8217;ve made a mistake and you want<br />
to undo it.  This is easy.  In command mode, type:</p>
<p><code>u</code></p>
<p>and VIM will undo your latest changes.  If you decided that you really<br />
did mean to make those changes, type:</p>
<p><code>&lt;CTRL&gt;+r</code></p>
<p>or</p>
<p><code>:redo</code></p>
<p>And the last change will be restored.</p>
<p>But VIM doesn&#8217;t just store a linear stack of changes.  Often, the<br />
changes you make will cause branches in the document&#8217;s change history,<br />
and VIM can help you navigate these changes.  If you type:</p>
<p><code>:undolist</code></p>
<p>You&#8217;ll see a not-very-user-friendly list of information in three<br />
columns.  The first column is the change number, which is the branch&#8217;s<br />
ID; the second is the number of changes that occurred in that branch,<br />
and the third is the time the branch was created.</p>
<p>The branch IDs are sequential, so if you remember the order in which<br />
changes were made, you can type:</p>
<p><code>:undo &lt;ID&gt;</code></p>
<p>to jump back to a specific branch.  But because the time stamps are<br />
included for each branch, you can also use the commands</p>
<p><code>:earlier</code></p>
<p>and</p>
<p><code>:later</code></p>
<p><code>:earlier</code> and <code>:later</code> take an argument of minutes, seconds, or hours.  So<br />
if you made a change ten minutes ago and you want to revert to it, you<br />
can type:</p>
<p><code>:earlier 10m</code></p>
<p>And from there,</p>
<p><code>:later 5m</code></p>
<p>You can also use the following commands to scroll backwards and forwards<br />
through all change branches:</p>
<p><code>:g-</code><br />
<code>:g+</code></p>
<p>Happy VIMming!</p>
<p>- David Roth</p>
<img style='display:none' id="post-563-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-this-aint-your-mommas-undo/',title:'noVIMber: This ain&#8217;t your momma&#8217;s undo',tweet:' 			 				 			 		 Like most modern applications, VIM has an undo/redo feature.  As you&#8217;re typi',description:' 			 				 			 		 Like most modern applications, VIM has an undo/redo feature.  As you&#8217;re typi'})"><script type='text/javascript'>document.getElementById("post-563-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-this-aint-your-mommas-undo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>noVIMber: Flexible and powerful VIM macros</title>
		<link>http://www.rjamestaylor.com/novimber-flexible-and-powerful-vim-macros/</link>
		<comments>http://www.rjamestaylor.com/novimber-flexible-and-powerful-vim-macros/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 16:08:33 +0000</pubDate>
		<dc:creator>druzziel</dc:creator>
				<category><![CDATA[Guest Articles]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.rjamestaylor.com/?p=561</guid>
		<description><![CDATA[This is one of the most flexible and powerful features of VIM: macros. On day 8 I mentioned registers. To recap: VIM provides 26 registers named a-z which can hold arbitrary text. This text can include VIM commands. When you are in command mode, typing q followed by the name of a register (a-z) will [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-flexible-and-powerful-vim-macros%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rjamestaylor.com%2Fnovimber-flexible-and-powerful-vim-macros%2F&amp;source=rjamestaylor&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>This is one of the most flexible and powerful features of VIM: macros.</p>
<p>On day 8 I mentioned registers.  To recap: VIM provides 26 registers<br />
named a-z which can hold arbitrary text.  This text can include VIM<br />
commands.  When you are in command mode, typing q followed by the name<br />
of a register (a-z) will put you in to macro recording mode.  Once this<br />
starts, every keystroke you type will be recorded into the register that<br />
you named.</p>
<p>When working with large blocks of structured text, this is insanely<br />
productive.  When you&#8217;re done typing the keystrokes that you need, hit<br />
<escape> to go back in to command mode and hit q again.  Now, all your<br />
keystrokes are in the register and ready for playback.</p>
<p>Type @+<register name> to play back the keystrokes.  VIM will play back<br />
exactly the commands you typed in while recording the macro, so if you<br />
need the cursor to drop to the next line, or if you need to search<br />
forward for some text, make sure that you end the macro with the<br />
appropriate keystrokes.</p>
<p>Since the macro is recorded to a register, the same rules of register<br />
use apply &#8211; if you want to append keystrokes to an existing macro that<br />
was recorded in register a, you can add more commands by typing qA<br />
(capital names append to registers).</p>
<p>Go crazy, and happy VIMming.</p>
<p>- David Roth</p>
<img style='display:none' id="post-561-blankimage" onload="Meebo('discoverSharable', {element: ((this.parentNode.className.match('post')) ? this.parentNode : this.parentNode.parentNode) ,url:'http://www.rjamestaylor.com/novimber-flexible-and-powerful-vim-macros/',title:'noVIMber: Flexible and powerful VIM macros',tweet:' 			 				 			 		 This is one of the most flexible and powerful features of VIM: macros. On day 8 I m',description:' 			 				 			 		 This is one of the most flexible and powerful features of VIM: macros. On day 8 I m'})"><script type='text/javascript'>document.getElementById("post-561-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://www.rjamestaylor.com/novimber-flexible-and-powerful-vim-macros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
