<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>Precisely That</title><generator>Tumblr (3.0; @preciselythat)</generator><link>http://jonathan.jsphere.com/</link><item><title>Taming Vim — 4. Buffers, Windows &amp; Tabs</title><description>&lt;blockquote&gt;
  &lt;p&gt;This is the fourth part in the series &lt;a href="/tagged/taming_vim" target="_blank"&gt;Taming Vim&lt;/a&gt;, a
  series focused on improving the intermediate &lt;a href="http://www.vim.org/" target="_blank"&gt;Vim&lt;/a&gt;
  user&amp;#8217;s understanding and operation of the text editor.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;I&amp;#8217;ll mostly be paraphrasing and summarising the introduction to buffers,
  windows and tabs from the &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=windows-intro" target="_blank"&gt;Vim help&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are some building blocks to understand with regards to buffers, windows
and tabs which will likely influence how you perceive and use them, as well as
how they differ from the more traditional perceptions:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;A buffer is the in-memory contents of a file, the original file remains
unchanged until you write the buffer.&lt;/li&gt;
&lt;li&gt;A window is a viewport on a buffer. You can use multiple windows on one
buffer, to view different parts of the same file, or multiple
windows for multiple buffers, to view other files at the same time.&lt;/li&gt;
&lt;li&gt;A tab is a collection of windows, only one tab can be visible at a time.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;By default you start with one tab, one window and one buffer when editing
a file with &lt;code&gt;vim file1&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;Buffers&lt;/h2&gt;

&lt;p&gt;You can open multiple buffers by invoking Vim with multiple arguments:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;vim file1 file2 file3
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Currently loaded buffers can be listed using the &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:ls" target="_blank"&gt;&lt;code&gt;:ls&lt;/code&gt;&lt;/a&gt; command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:ls
  1 %a   "file1"                        line 1
  2      "file2"                        line 0
  3      "file3"                        line 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This output shows us a multitude of information:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;The unique buffer number, which does not change for the lifetime of your Vim
session, which can be quickly switched to with the buffer number followed by
&lt;code&gt;Ctrl-^&lt;/code&gt; (that is, &lt;code&gt;Ctrl-Shift-6&lt;/code&gt;), e.g. &lt;code&gt;3 Ctrl-^&lt;/code&gt; will switch to the
“file3” buffer. &lt;code&gt;:edit #3&lt;/code&gt; (or &lt;code&gt;:e #3&lt;/code&gt;) is the equivalent command-line.&lt;/li&gt;
&lt;li&gt;The buffer in the current window, denoted by the &lt;code&gt;%&lt;/code&gt; indicator. Only one
buffer can ever be the current window.&lt;/li&gt;
&lt;li&gt;An active buffer, one that is loaded and visible, denoted by &lt;code&gt;a&lt;/code&gt;. It is
possible for multiple buffers to be active if you have multiple windows or
tabs.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Examining &lt;code&gt;:ls&lt;/code&gt; after splitting our current window horizontally with &lt;code&gt;Ctrl-W s&lt;/code&gt;
and switching to buffer 2 with &lt;code&gt;:e #2&lt;/code&gt; we can see new information:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:ls
  1 #a   "file1"                        line 1
  2 %a   "file2"                        line 1
  3      "file3"                        line 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Firstly, notice that two buffers are active now because of our window split and
buffer switch. Secondly, notice the “alternate buffer” indicator &lt;code&gt;#&lt;/code&gt;. You can
switch back and forth between the active and alternate buffer with &lt;code&gt;Ctrl-^&lt;/code&gt;
(without a number preceding it) or &lt;code&gt;:e #&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Writing some text into the buffer, without saving, we now see the modification
indicator &lt;code&gt;+&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:ls
  1 #a   "file1"                        line 1
  2 %a + "file2"                        line 1
  3      "file3"                        line 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Attempting to change away from the modified buffer, with &lt;code&gt;:bnext&lt;/code&gt; for example,
results in an error: “E37: No write since last change (add&amp;#160;! to override)”,
sure enough &lt;code&gt;:bnext!&lt;/code&gt; changes the buffer as expected. I personally find this
&amp;#8220;protection&amp;#8221; annoying, fortunately there is the &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag='hidden'" target="_blank"&gt;&lt;code&gt;hidden&lt;/code&gt;&lt;/a&gt; option which
allows you to switch away from a modified buffer (called abandoning it) forcing
it to become hidden automatically.&lt;/p&gt;

&lt;p&gt;A good way of switching between buffers by name is &lt;code&gt;:buffer&lt;/code&gt; (or &lt;code&gt;:b&lt;/code&gt;) followed
by the name, the upside of this is that Vim will tab-complete the name for you.
(Although there is &lt;a href="/post/9307723301/taming-vim-2-plugins#lusty-explorer" target="_blank"&gt;a better way&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; It is important to understand that &lt;code&gt;q!&lt;/code&gt; becomes more dangerous with
this option, since modified hidden buffers will discarded when quitting without
writing.&lt;/p&gt;

&lt;p&gt;If you use the command line frequently it might be useful to know can list the
&lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=argument-list" target="_blank"&gt;argument list&lt;/a&gt;, as given at the command line, with
&lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:args" target="_blank"&gt;&lt;code&gt;:args&lt;/code&gt;&lt;/a&gt; and move to the next and previous buffer specified by command
line arguments with &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:next" target="_blank"&gt;&lt;code&gt;:next&lt;/code&gt;&lt;/a&gt; and &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:prev" target="_blank"&gt;&lt;code&gt;:prev&lt;/code&gt;&lt;/a&gt; respectively.&lt;/p&gt;

&lt;h3&gt;Buffer reference&lt;/h3&gt;

&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Command&lt;/th&gt;
  &lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;N Ctrl-^&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Switch to buffer number &lt;em&gt;N&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:e[dit] #N&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Switch to buffer number &lt;em&gt;N&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-^&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Switch to the alternate buffer&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:e[dit] #&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Switch to the alternate buffer&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:bn[ext]&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Go to the next buffer&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:bp[revious]&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Go to the previous buffer&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:bf[irst]&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Go to the first buffer&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:bl[ast]&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Go to the last buffer&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:bd[elete]&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Remove the buffer from the buffer list&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;:b[uffer] B&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Switch to the buffer with the name &lt;em&gt;B&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Windows&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;Most of the window commands are quite similar to the buffer commands,
  understanding the buffer commands will help you understand and remember the
  window commands.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Use the &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=-o" target="_blank"&gt;&lt;code&gt;-o&lt;/code&gt;&lt;/a&gt; or &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=-O" target="_blank"&gt;&lt;code&gt;-O&lt;/code&gt;&lt;/a&gt; command-line options to open
files in multiple horizontal splits or vertical window splits respectively.&lt;/p&gt;

&lt;p&gt;Windows are an important way to make efficient use of your screen real-estate
and increase your productivity. Perhaps the most basic and useful window
command is split: pressing &lt;code&gt;Ctrl-W s&lt;/code&gt; equally splits the current window
horizontally, while &lt;code&gt;Ctrl-W v&lt;/code&gt; equally splits the current window vertically.
Use &lt;code&gt;Ctrl-W T&lt;/code&gt; to move the current window to a new tab.&lt;/p&gt;

&lt;p&gt;Moving between windows is quite logical, after pressing &lt;code&gt;Ctrl-W&lt;/code&gt; the normal Vim
movement keys (or the more conventional arrow keys) &lt;code&gt;h&lt;/code&gt;, &lt;code&gt;j&lt;/code&gt;, &lt;code&gt;k&lt;/code&gt; or &lt;code&gt;l&lt;/code&gt; will
move you to the window left, down, up or right from the current window. You can
also use &lt;code&gt;Ctrl-W w&lt;/code&gt; to move to the window below / right from the current one,
or &lt;code&gt;Ctrl-W W&lt;/code&gt; to move to the window above / left of the current window. If you
find yourself moving back and forth between two windows often, you can use
&lt;code&gt;Ctrl-W p&lt;/code&gt; to switch to the previously accessed window.&lt;/p&gt;

&lt;p&gt;A cousin of &lt;code&gt;Ctrl-^&lt;/code&gt; from the buffer section, &lt;code&gt;Ctrl-W ^&lt;/code&gt; (or &lt;code&gt;Ctrl-W Ctrl-^&lt;/code&gt;)
splits the window and edits the alternate buffer, similarly &lt;code&gt;N Ctrl-W Ctrl-^&lt;/code&gt;
splits and edits buffer number &lt;em&gt;N&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;Window reference&lt;/h3&gt;

&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Command&lt;/th&gt;
  &lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W s&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Split a window horizontally&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W v&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Split a window vertically&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W p&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move to the previously accessed window&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W T&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move the current window to a new tab&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W h&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move to the window to the left&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W j&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move to the window to the below&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W k&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move to the window to the above&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W l&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move to the window to the right&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W w&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move to the window to the below / right&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W W&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Move to the window to the above / left&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;Ctrl-W ^&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Split the window and edit the alternate buffer&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;N Ctrl-W ^&lt;/code&gt;&lt;/td&gt;
  &lt;td&gt;Split the window and edit buffer number &lt;em&gt;N&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Tabs&lt;/h2&gt;

&lt;p&gt;Use the &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=-p" target="_blank"&gt;&lt;code&gt;-p&lt;/code&gt;&lt;/a&gt; command-line option to open arguments in separate tab
pages.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s lonely at the top and tabs are no exception. Tabs lack the plethora of
commands and options that buffers (and even windows) have but this doesn&amp;#8217;t make
them any more useful.&lt;/p&gt;

&lt;p&gt;To edit a file in a tab you can use &lt;code&gt;:tabedit filename&lt;/code&gt;, much like &lt;code&gt;:edit
filename&lt;/code&gt;, and &lt;code&gt;:tabclose&lt;/code&gt; to close a tab and all its windows. &lt;code&gt;gt&lt;/code&gt; and &lt;code&gt;gT&lt;/code&gt;
will switch to the next and previous tab respectively, a number followed by
&lt;code&gt;gt&lt;/code&gt; will switch to that tab. I find these shortcuts painful compared to the
buffer and window commands and use mappings to make things easier:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;(These mappings are for MacVim (the &lt;code&gt;D&lt;/code&gt; modifier is the &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Command_key" target="_blank"&gt;Command key&lt;/a&gt;)
  but serve as a useful guideline you can adapt to your platform of choice.)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;pre&gt;&lt;code&gt;noremap &amp;lt;D-1&amp;gt; 1gt
noremap &amp;lt;D-2&amp;gt; 2gt
noremap &amp;lt;D-3&amp;gt; 3gt
noremap &amp;lt;D-4&amp;gt; 4gt
noremap &amp;lt;D-5&amp;gt; 5gt
noremap &amp;lt;D-6&amp;gt; 6gt
noremap &amp;lt;D-7&amp;gt; 7gt
noremap &amp;lt;D-8&amp;gt; 8gt
noremap &amp;lt;D-9&amp;gt; 9gt
noremap &amp;lt;D-0&amp;gt; :tablast&amp;lt;CR&amp;gt;
" MacVim has these bindings by default.
noremap &amp;lt;D-S-]&amp;gt; gt
noremap &amp;lt;D-S-[&amp;gt; gT
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now cycling through tabs is accomplished with the more conventional &lt;code&gt;Cmd-{&lt;/code&gt; and
&lt;code&gt;Cmd-}&lt;/code&gt; commands, and switching to tab 1 with &lt;code&gt;Cmd-1&lt;/code&gt;, tab 2 with &lt;code&gt;Cmd-2&lt;/code&gt;, etc.&lt;/p&gt;

&lt;h2&gt;There is no spoon&lt;/h2&gt;

&lt;p&gt;Don&amp;#8217;t be intimidated by the number of commands and options for buffers, windows
and tabs. Start slowly with a few of the most useful commands and &lt;em&gt;regularly&lt;/em&gt;
think about your most frequent actions, introducing new commands (or even your
own &lt;a href="/post/9554800321/taming-vim-3-mappings-macros" target="_blank"&gt;mappings&lt;/a&gt;) when you&amp;#8217;re comfortable with the others or want
to improve your workflow.&lt;/p&gt;

&lt;p&gt;Challenge yourself to find new ways to arrange your buffers within windows or
windows within tabs. Unlike a lot of other editors or IDEs you are not limited
to one file per tab. There&amp;#8217;s not even any reason to only use tabs with files,
you can put your quickfix window, grep results, help text, file listings, etc.
in tabs too!&lt;/p&gt;

&lt;p&gt;Drew Neil has some great screencasts on the topics of &lt;a href="http://vimcasts.org/episodes/working-with-buffers/" target="_blank"&gt;buffers&lt;/a&gt;,
&lt;a href="http://vimcasts.org/episodes/working-with-windows/" target="_blank"&gt;windows&lt;/a&gt; and &lt;a href="http://vimcasts.org/episodes/working-with-tabs/" target="_blank"&gt;tabs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Experiment!&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;These long posts can be time-consuming and tedious both to read and write, I&amp;#8217;m
  going to make an effort to write more concisely and on smaller topics.&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://jonathan.jsphere.com/post/9927807318</link><guid>http://jonathan.jsphere.com/post/9927807318</guid><pubDate>Wed, 07 Sep 2011 23:16:45 +0300</pubDate><category>taming vim</category><category>vim</category></item><item><title>Taming Vim — 3. Mappings &amp; Macros</title><description>&lt;blockquote&gt;
  &lt;p&gt;This is the third part in the series &lt;a href="/tagged/taming_vim" target="_blank"&gt;Taming Vim&lt;/a&gt;,
  a series focused on improving the intermediate &lt;a href="http://www.vim.org/" target="_blank"&gt;Vim&lt;/a&gt;
  user&amp;#8217;s understanding and operation of the text editor.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Understanding mappings&lt;/h2&gt;

&lt;p&gt;Mapping, or &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=key-mapping" target="_blank"&gt;key mapping&lt;/a&gt;, is used to change the meaning of keys.
We can, for example, map the “F1” key to do something silly like delete from
the first &lt;code&gt;a&lt;/code&gt; to the next &lt;code&gt;a&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:map &amp;lt;F1&amp;gt; 0fadfa
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we can go to the beginning of the line (&lt;code&gt;0&lt;/code&gt;), go to the next &lt;code&gt;a&lt;/code&gt; (&lt;code&gt;fa&lt;/code&gt;),
delete to the following &lt;code&gt;a&lt;/code&gt; (&lt;code&gt;dfa&lt;/code&gt;) just by pressing “F1” in normal mode. Vim
has other modes (see what happens if you press “F1” in another mode) but we
only intended this to work in normal mode. Consulting the &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=map-overview" target="_blank"&gt;map
overview&lt;/a&gt; shows that &lt;code&gt;:map&lt;/code&gt; defines the mapping for most modes
when what we actually want is &lt;code&gt;:nmap&lt;/code&gt;. However, it is still possible to make
our command work in insert mode (visual mode is left as an exercise):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:imap &amp;lt;F1&amp;gt; &amp;lt;Esc&amp;gt;&amp;lt;F1&amp;gt;i
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Exit insert mode (&lt;code&gt;&amp;lt;Esc&amp;gt;&lt;/code&gt;), perform our “F1” mapping, enter insert mode again.
We can also map commands that need to be executed on the Vim command line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:nnoremap &amp;lt;F2&amp;gt; :%s/teh/the/g&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pressing “F2” will replace all instances of “teh” with “the”, notice that
&lt;code&gt;&amp;lt;CR&amp;gt;&lt;/code&gt; appears at the of the command to emulate pressing the return key,
without this we&amp;#8217;d just be left in the command line without executing anything
(which can be useful in some circumstances.) Other &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:map-special-keys" target="_blank"&gt;special
keys&lt;/a&gt; (like the up arrow, “F1”, etc.) and &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:map-special-chars" target="_blank"&gt;special
characters&lt;/a&gt; (like “escape”, “return”, etc.) are well
documented. More often than not mappings should be declared with the “noremap”
variants to avoid accidental recursive or nested mappings.&lt;/p&gt;

&lt;p&gt;A special key often used by Vim users (and plugin authors) for their own
purposes is &lt;code&gt;&amp;lt;Leader&amp;gt;&lt;/code&gt;. The &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=mapleader" target="_blank"&gt;map leader&lt;/a&gt; defaults to backslash (&lt;code&gt;\&lt;/code&gt;)
but can be changed (I use the more accessible comma (&lt;code&gt;,&lt;/code&gt;) key) by setting the
&lt;code&gt;mapleader&lt;/code&gt; variable; there are some caveats about setting this, be sure to
consult the help.&lt;/p&gt;

&lt;p&gt;Vim mappings are not limited to just a single special key or even a single
character, they can be a sequence of just about any keystrokes! Following on
from this, Vim allows &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=map-ambiguous" target="_blank"&gt;ambiguous mappings&lt;/a&gt;, meaning that it is
possible to have a mapping for &lt;code&gt;aa&lt;/code&gt; and &lt;code&gt;ab&lt;/code&gt; and Vim will wait &lt;sup id="fnref:p9554800321-1"&gt;&lt;a href="#fn:p9554800321-1" rel="footnote" target="_blank"&gt;1&lt;/a&gt;&lt;/sup&gt; after the
first &lt;code&gt;a&lt;/code&gt; to see which one you meant.&lt;/p&gt;

&lt;p&gt;Anything you can type into Vim with your hands can be mapped!&lt;/p&gt;

&lt;h2&gt;Mappings&lt;/h2&gt;

&lt;p&gt;The &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:make" target="_blank"&gt;make&lt;/a&gt; command can be a useful for things other than running GNU make.
I use it to run &lt;a href="/post/9380848982/pyflakes-errors-in-your-vim-quickfix-window" target="_blank"&gt;Pyflakes&lt;/a&gt; and &lt;a href="/post/9163688573/jshint-errors-in-your-vim-quickfix-window" target="_blank"&gt;JSHint&lt;/a&gt;, opening the quickfix window if
there are any errors, simply by pressing “F5”:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;nnoremap &amp;lt;F5&amp;gt; :silent make %&amp;lt;CR&amp;gt;:cwindow&amp;lt;CR&amp;gt;

" Quickfix navigation.
nnoremap ]q :cnext&amp;lt;CR&amp;gt;
nnoremap [q :cprevious&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(Some people prefer to run their unit tests with &lt;code&gt;make&lt;/code&gt;, I haven&amp;#8217;t found a good
way to get &lt;a href="http://twistedmatrix.com/trac/wiki/TwistedTrial" target="_blank"&gt;trial&lt;/a&gt; results into the quickfix window yet.)&lt;/p&gt;

&lt;p&gt;Or to move the current line up and down (from normal, visual or insert mode)
one line at a time with “Ctrl-Shift-Up” and “Ctrl-Shift-Down”:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;nnoremap &amp;lt;silent&amp;gt; &amp;lt;C-S-Up&amp;gt; :move .-2&amp;lt;CR&amp;gt;|
nnoremap &amp;lt;silent&amp;gt; &amp;lt;C-S-Down&amp;gt; :move .+1&amp;lt;CR&amp;gt;|
vnoremap &amp;lt;silent&amp;gt; &amp;lt;C-S-Up&amp;gt; :move '&amp;lt;-2&amp;lt;CR&amp;gt;gv|
vnoremap &amp;lt;silent&amp;gt; &amp;lt;C-S-Down&amp;gt; :move '&amp;gt;+1&amp;lt;CR&amp;gt;gv|
inoremap &amp;lt;silent&amp;gt; &amp;lt;C-S-Up&amp;gt; &amp;lt;C-o&amp;gt;:move .-2&amp;lt;CR&amp;gt;|
inoremap &amp;lt;silent&amp;gt; &amp;lt;C-S-Down&amp;gt; &amp;lt;C-o&amp;gt;:move .+1&amp;lt;CR&amp;gt;|
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or &lt;a href="http://betterthangrep.com/" target="_blank"&gt;ack&lt;/a&gt; (with &lt;a href="http://www.vim.org/scripts/script.php?script_id=2572" target="_blank"&gt;ack.vim&lt;/a&gt;) the word under the cursor (or the current
visual selection), and put the results in the &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=location-list" target="_blank"&gt;location list&lt;/a&gt;, with
&lt;code&gt;&amp;lt;Leader&amp;gt;gw&lt;/code&gt; or &lt;code&gt;&amp;lt;Leader&amp;gt;gW&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;" :LAck the word under the cursor in the current file and open the location list.
nnoremap &amp;lt;Leader&amp;gt;gw :silent LAck \\b&amp;lt;C-r&amp;gt;&amp;lt;C-w&amp;gt;\\b %:p&amp;lt;Bar&amp;gt;:lwindow&amp;lt;CR&amp;gt;
vnoremap &amp;lt;Leader&amp;gt;gw "zy:silent LAck &amp;lt;C-r&amp;gt;z %:p&amp;lt;Bar&amp;gt;:lwindow&amp;lt;CR&amp;gt;

" :LAck the word under the cursor recursively and open the location list.
nnoremap &amp;lt;Leader&amp;gt;gW :silent LAck \\b&amp;lt;C-r&amp;gt;&amp;lt;C-w&amp;gt;\\b&amp;lt;Bar&amp;gt;:lwindow&amp;lt;CR&amp;gt;
vnoremap &amp;lt;Leader&amp;gt;gW "zy:silent LAck &amp;lt;C-r&amp;gt;z&amp;lt;Bar&amp;gt;:lwindow&amp;lt;CR&amp;gt;

" Location list navigation.
nnoremap ]w :lnext&amp;lt;CR&amp;gt;
nnoremap [w :lprevious&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(It is possible to change &lt;code&gt;:LAck&lt;/code&gt; to &lt;code&gt;:lgrep&lt;/code&gt; with no or few modifications.)&lt;/p&gt;

&lt;h2&gt;Macros&lt;/h2&gt;

&lt;p&gt;Macros, or &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=complex-repeat" target="_blank"&gt;complex repeats&lt;/a&gt;, are closely related to mappings
but seem to be geared more for short-term use. The Vim &lt;a href="http://vim.wikia.com/wiki/Macros" target="_blank"&gt;wiki page for
macros&lt;/a&gt; talks about saving macros but I would
turn it into a mapping for longer-term use.&lt;/p&gt;

&lt;p&gt;Begin recording a &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Macro_%28computer_science%29" target="_blank"&gt;macro&lt;/a&gt; by pressing &lt;code&gt;q&lt;/code&gt; followed by the name of
a &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=registers" target="_blank"&gt;register&lt;/a&gt;, the text “recording” will appear in the status line to confirm,
commands are recorded into the selected register until &lt;code&gt;q&lt;/code&gt; is pressed again. To
execute (read: play back) the contents of a register use the &lt;code&gt;@&lt;/code&gt; command
followed by the name of the register to play back.  Usefully, &lt;code&gt;@@&lt;/code&gt; will execute
the previously executed macro again.&lt;/p&gt;

&lt;h3&gt;True story&lt;/h3&gt;

&lt;p&gt;Recently I ran JSHint over a codebase I work on and it suggested, among other
things, I rewrite &lt;code&gt;foo["bar"]&lt;/code&gt; as &lt;code&gt;foo.bar&lt;/code&gt;. Now this may seem like a job for
a substitution but consider these points:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;&lt;p&gt;This only applies to indexing objects with static strings, which could
potentially be delimited by &lt;code&gt;'&lt;/code&gt; or &lt;code&gt;"&lt;/code&gt;, and contain escaped delimiters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These statements often share a line with other code that I don&amp;#8217;t want to
unwittingly break.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I already know Vim commands and I can build my macro as I edit with
powerful text-editing commands.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Using my JSHint compiler and &lt;code&gt;]q&lt;/code&gt; the cursor is placed on the first character
after the &lt;code&gt;[&lt;/code&gt;, armed with this I arrived at the following sequence of commands
after only a few attempts:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;di'"_ca[.&amp;lt;Ctrl-R&amp;gt;"&amp;lt;Escape&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;code&gt;&amp;lt;Ctrl-R&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;Escape&amp;gt;&lt;/code&gt; are literal keystrokes pushed during the recording.)&lt;/p&gt;

&lt;p&gt;Delete the text inside, but excluding, the single quotes (&lt;code&gt;di'&lt;/code&gt;). Delete the
text inside, and including, the square brackets into the blackhole register and
start insert mode (&lt;code&gt;"_ca[&lt;/code&gt;). In insert mode, insert a period and the
contents of the unnamed register, containing the text from the first delete,
and return to normal mode (&lt;code&gt;.&amp;lt;Ctrl-R&amp;gt;"&amp;lt;Escape&amp;gt;&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Pressing &lt;code&gt;]q&lt;/code&gt; to move between errors and &lt;code&gt;@@&lt;/code&gt; to run my macro over them
(occasionally making other edits) really sped the process up while also giving
me a warm fuzzy feeling inside.&lt;/p&gt;

&lt;h2&gt;X marks the spot.&lt;/h2&gt;

&lt;p&gt;Mappings and macros are powerful ways to improve productivity with tasks you
perform frequently, the difficult part is recognizing those time-consuming (or
RSI-inducing) bad habits that would benefit from being converted to mappings
(or macros.)&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m slowly building up my collection of mappings, most of which were inspired by
the work of others, but I&amp;#8217;d love to &lt;a href="https://twitter.com/k4y" target="_blank"&gt;hear&lt;/a&gt; about some
mappings you are proud of, rely on day to day or just think are awesome!&lt;/p&gt;

&lt;h2&gt;What&amp;#8217;s all this then?&lt;/h2&gt;

&lt;p&gt;I don&amp;#8217;t have a topic planned for my next post, if you have something you&amp;#8217;d like
to know more about or something interesting you think other people should know
more about, &lt;a href="https://twitter.com/k4y" target="_blank"&gt;let me know&lt;/a&gt;!&lt;/p&gt;

&lt;div class="footnotes"&gt;
&lt;hr&gt;&lt;ol&gt;&lt;li id="fn:p9554800321-1"&gt;
&lt;p&gt;There is a timeout for mapped key sequences, see &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag='timeout'" target="_blank"&gt;timeout&lt;/a&gt;, &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag='ttimeout'" target="_blank"&gt;ttimeout&lt;/a&gt;,
&lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag='timeoutlen'" target="_blank"&gt;timeoutlen&lt;/a&gt; and &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag='ttimeoutlen'" target="_blank"&gt;ttimeoutlen&lt;/a&gt; for more information. &lt;a href="#fnref:p9554800321-1" rev="footnote" target="_blank"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;&lt;/div&gt;</description><link>http://jonathan.jsphere.com/post/9554800321</link><guid>http://jonathan.jsphere.com/post/9554800321</guid><pubDate>Mon, 29 Aug 2011 22:46:00 +0300</pubDate><category>taming vim</category><category>vim</category></item><item><title>Pyflakes errors in your Vim quickfix window</title><description>&lt;p&gt;To use &lt;a href="http://pypi.python.org/pypi/pyflakes" target="_blank"&gt;Pyflakes&lt;/a&gt; as your “compiler” for Python files in Vim put this into &lt;a href="http://bazaar.launchpad.net/~jjacobs/+junk/dotfiles/view/head:/.vim/compiler/pyflakes.vim" target="_blank"&gt;~/.vim/compilers/pyflakes.vim&lt;/a&gt; &lt;sup id="fnref:p9380848982-1"&gt;&lt;a href="#fn:p9380848982-1" rel="footnote" target="_blank"&gt;1&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CompilerSet errorformat=%f:%l:\ %m
CompilerSet makeprg=pyflakes
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then you can do &lt;code&gt;:compiler pyflakes&lt;/code&gt; to set the compiler (although you might want to do that in an ftplugin) and &lt;code&gt;:make %&lt;/code&gt; to run the current file through Pyflakes and put any errors into your Vim quickfix window.&lt;/p&gt;

&lt;div class="footnotes"&gt;
&lt;hr&gt;&lt;ol&gt;&lt;li id="fn:p9380848982-1"&gt;
&lt;p&gt;This assumes that “pyflakes” is an executable in your path that runs Pyflakes, adjust makeprg accordingly. &lt;a href="#fnref:p9380848982-1" rev="footnote" target="_blank"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;&lt;/div&gt;</description><link>http://jonathan.jsphere.com/post/9380848982</link><guid>http://jonathan.jsphere.com/post/9380848982</guid><pubDate>Thu, 25 Aug 2011 21:01:06 +0300</pubDate><category>vim</category></item><item><title>Using your favourite text editor in your browser</title><description>&lt;p&gt;If you&amp;#8217;ve used the Internets and a browser (I found you!) then you&amp;#8217;ve probably also typed a bunch of text into a &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; element and thought &amp;#8220;Meh.&amp;#8221;&lt;/p&gt;

&lt;p&gt;Enter &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/its-all-text/" target="_blank"&gt;It&amp;#8217;s All Text&lt;/a&gt;. Executive summary: Edit &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;&amp;#8217;s with your favourite editor and enjoy a healthier lifestyle. It&amp;#8217;ll even update the text area for you when you save the document in your editor!&lt;/p&gt;

&lt;p&gt;Hundreds of syntax files exist for almost every good text editor, like Vim:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Writing &lt;a href="http://www.vim.org/scripts/script.php?script_id=3337" target="_blank"&gt;Trac wiki markup&lt;/a&gt;? &lt;code&gt;:set ft=tracwiki&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Replying to &lt;a href="http://www.vim.org/scripts/script.php?script_id=813" target="_blank"&gt;e-mail&lt;/a&gt;? &lt;code&gt;:set ft=mail&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Writing &lt;a href="http://www.vim.org/scripts/script.php?script_id=2882" target="_blank"&gt;Markdown&lt;/a&gt;? &lt;code&gt;:set ft=markdown&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Contributing to &lt;a href="http://www.vim.org/scripts/script.php?script_id=1787" target="_blank"&gt;Wikipedia&lt;/a&gt;? &lt;code&gt;:set ft=Wikipedia&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Got any others suitable for the Interweb? &lt;a href="https://twitter.com/k4y" target="_blank"&gt;Tell me&lt;/a&gt;.&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/9348624626</link><guid>http://jonathan.jsphere.com/post/9348624626</guid><pubDate>Thu, 25 Aug 2011 01:01:00 +0300</pubDate><category>vim</category></item><item><title>Taming Vim — 2. Plugins</title><description>&lt;blockquote&gt;
  &lt;p&gt;This is the second part in the series &lt;a href="/tagged/taming_vim" target="_blank"&gt;Taming Vim&lt;/a&gt;,
  a series focused on improving the intermediate &lt;a href="http://www.vim.org/" target="_blank"&gt;Vim&lt;/a&gt;
  user&amp;#8217;s understanding and operation of the text editor.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Vim features an amazing amount of functionality at its core, functionality
built up over the years (Vim itself is 20 years old this year and Vi, in the
incarnation we know today, was created more than 30 years ago!) The beauty of
Vim&amp;#8217;s design is the “language” (see &lt;a href="http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118" target="_blank"&gt;Jim Dennis&amp;#8217; exquisite
answer&lt;/a&gt;
linked from my first post) used to communicate your intentions to the editor.&lt;/p&gt;

&lt;p&gt;For example, by introducing only a new
&lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=cursor-motions" target="_blank"&gt;&lt;em&gt;motion&lt;/em&gt;&lt;/a&gt; you
can now select, compose or otherwise operate on a new “shape” &lt;sup id="fnref:p9307723301-1"&gt;&lt;a href="#fn:p9307723301-1" rel="footnote" target="_blank"&gt;1&lt;/a&gt;&lt;/sup&gt; of text with
the same &lt;em&gt;verbs&lt;/em&gt; you&amp;#8217;re already familiar with.&lt;/p&gt;

&lt;p&gt;There are hundreds of official plugins for Vim, and probably hundreds more
unofficial plugins, these are some of the plugins I use and am familiar with
with, it is by no means a complete list. I encourage you to explore the Vim
plugins available through &lt;a href="http://www.vim.org/scripts/" target="_blank"&gt;official&lt;/a&gt; and
&lt;a href="http://ww.reddit.com/r/vim/" target="_blank"&gt;unofficial&lt;/a&gt; channels.&lt;/p&gt;

&lt;h2&gt;Plugins&lt;/h2&gt;

&lt;p&gt;I recommend using &lt;a href="http://www.vim.org/scripts/script.php?script_id=2332" target="_blank"&gt;Pathogen&lt;/a&gt; to automatically load your plugins while keeping
them in separate directories for ease of management, it has the added bonus of
being able to generate help tags for all plugins with the &lt;code&gt;:Helptags&lt;/code&gt; command.&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://github.com/michaeljsmith/vim-indent-object" target="_blank"&gt;indent-object&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Vim &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=text-objects" target="_blank"&gt;text objects&lt;/a&gt; provide a convenient way to select and operate
on the &lt;em&gt;shape&lt;/em&gt; of text. In a language like Python it can be useful to operate
on text in your current level of indentation, enter indent-object. For example,
assume that &lt;code&gt;▯&lt;/code&gt; is the cursor in normal mode:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if cond:
    foo()

    for x in xs:
        ▯bar(x)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;From this line pressing &lt;code&gt;&amp;lt;ai&lt;/code&gt; will unindent the entire loop, including the
&lt;code&gt;for&lt;/code&gt; line by one level. From the same line pressing &lt;code&gt;&amp;lt;ii&lt;/code&gt; will unindent only
the loop body.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:h indent-object&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a href="https://github.com/godlygeek/tabular" target="_blank"&gt;Tabular&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Simply put, Tabular aligns a body of text on a pattern; for example, lining up
your assignment statements, which is a grueling task when done by hand. Drew
Neil covers this plugin in &lt;a href="http://vimcasts.org/episodes/aligning-text-with-tabular-vim/" target="_blank"&gt;one of his excellent
screencasts&lt;/a&gt;,
well worth watching.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:h tabular&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1697" target="_blank"&gt;surround.vim&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;This powerful plugin is all about things that surround other things:
parentheses, brackets, quotes, XML tags, etc. For example, assume again that
&lt;code&gt;▯&lt;/code&gt; is the cursor in normal mode:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Hello ▯world.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pressing &lt;code&gt;yss"&lt;/code&gt; will wrap the whole line (you can use any &lt;em&gt;motion&lt;/em&gt; instead of
the final &lt;code&gt;s&lt;/code&gt; here), excluding leading whitespace, in double-quotes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;"Hello ▯world."
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pressing &lt;code&gt;cs"'&lt;/code&gt; will change the surrounding double-quotes to single-quotes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;'Hello ▯world.'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pressing &lt;code&gt;cs')&lt;/code&gt; will change the surrounding single-quotes to parentheses
without padding (use &lt;code&gt;(&lt;/code&gt; for inner-padding):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(Hello ▯world.)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, pressing &lt;code&gt;ds)&lt;/code&gt; will delete the surrounding parentheses:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Hello ▯world.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This really just scratches the surface of surround.vim, something I didn&amp;#8217;t
cover is using it when writing an SGML-based language, like XML or HTML.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:h surround&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://sjl.bitbucket.org/gundo.vim/" target="_blank"&gt;Gundo&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Vim&amp;#8217;s undo feature may look like any normal linear undo history, &lt;code&gt;u&lt;/code&gt; to undo
and &lt;code&gt;Ctrl-r&lt;/code&gt; to redo. Actually it&amp;#8217;s a &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=undo-tree" target="_blank"&gt;tree&lt;/a&gt;! When you modify an
older text state, i.e. pressing &lt;code&gt;u&lt;/code&gt; a few times and then changing the buffer,
you are creating a new undo branch. Pressing &lt;code&gt;u&lt;/code&gt; or &lt;code&gt;Ctrl-r&lt;/code&gt; moves you backward
or forward chronologically along your &lt;strong&gt;current&lt;/strong&gt; branch, &lt;code&gt;g+&lt;/code&gt; and &lt;code&gt;g-&lt;/code&gt;
traverse the entire tree in chronological order. You can even go back and
forward by a relative amount of time with &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:earlier" target="_blank"&gt;&lt;code&gt;:earlier&lt;/code&gt;&lt;/a&gt; and
&lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=:later" target="_blank"&gt;&lt;code&gt;:later&lt;/code&gt;&lt;/a&gt;:, use &lt;code&gt;:earlier 5m&lt;/code&gt; to go back to a state from 5 minutes ago!
Time travel!&lt;/p&gt;

&lt;p&gt;It can be tricky to visualize this undo tree, which is where Gundo comes in,
it draws a pretty ASCII tree showing you the current undo tree and will let you
move around it easily.&lt;/p&gt;

&lt;p&gt;Drew Neil &lt;a href="http://vimcasts.org/episodes/undo-branching-and-gundo-vim/" target="_blank"&gt;explains
it&lt;/a&gt; with pretty
diagrams and Back to the Future references.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:h gundo.txt&lt;/code&gt;&lt;/p&gt;

&lt;h3 id="lusty-explorer"&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1890" target="_blank"&gt;LustyExplorer&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Managing buffers can be an arduous process, inevitably when working on a large
project you&amp;#8217;ll either have a million hidden buffers or a million tabs open (and
probably still have hidden buffers.) LustyExplorer can search your buffers by
name (with fuzzy matching) and can grep the contents of your buffers to find
that other buffer with that text that said that thing in it. Hello
productivity!&lt;/p&gt;

&lt;p&gt;As well as being a buffer manager, LustyExplorer is a great filesystem explorer
that&amp;#8217;ll let you search your filesystem, again with fuzzy matching, from either
the current working directory or the directory of the current file. Once you&amp;#8217;ve
narrowed your search down you can press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;Tab&amp;gt;&lt;/code&gt; to open the file
in the current window, or &lt;code&gt;Ctrl-t&lt;/code&gt;, &lt;code&gt;Ctrl-o&lt;/code&gt;, &lt;code&gt;Ctrl-v&lt;/code&gt; to open the file in a
new tab, horizontal split or vertical split, respectively.&lt;/p&gt;

&lt;p&gt;Unfortunately the only complete documentation exists as a comment within the
plugin source itself.&lt;/p&gt;

&lt;h3&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=2540" target="_blank"&gt;snipMate&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;If you&amp;#8217;ve ever used snippets in applications like TextMate or Visual Studio
then you&amp;#8217;ve used snipMate. With a comprehensive list of snippets for popular
languages, using a snippet is as simple as typing the keyword and hitting tab:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cl&amp;lt;tab&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Produces:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class ClassName(object):
    """docstring for ClassName"""
    def __init__(self, arg):
        super(ClassName, self).__init__()
        self.arg = arg
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pressing tab again moves your cursor between the snippet placeholders. You can
define your own snippets too which is extremely useful for repetitive tasks
such as laying out unit test skeletons.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:h snipMate.txt&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;Wild geese&lt;/h2&gt;

&lt;p&gt;Plugins are a great way to make big improvements with a little action but don&amp;#8217;t
rely on gimmicks for Real Ultimate Power, exploit Vim&amp;#8217;s core strengths and rely
on plugins to reinforce the weak areas. Don&amp;#8217;t be the person whose Vim session
has ten information-panels, a multi-line toolbar and only a 40x25 window for
entering text.&lt;/p&gt;

&lt;p&gt;In the next installment I&amp;#8217;ll talk about keyboard mappings and touch on Vim
macros.&lt;/p&gt;

&lt;h2&gt;Major Tom to ground control!&lt;/h2&gt;

&lt;p&gt;(Writing text is fun and imagining I&amp;#8217;m helping people makes me feel warm and
fuzzy but it leaves me feeling a little detached. I&amp;#8217;ve decided to ask the
Internets a question at the end of each post that can be answered in a tweet,
both to educate me and other people. If you enjoyed this article or learned
something I&amp;#8217;d appreciate it if you participated, consider it a knowledge
donation!)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/k4y" target="_blank"&gt;Tweet me&lt;/a&gt; your &lt;em&gt;one&lt;/em&gt; Vim plugin you&amp;#8217;re most grateful
for, especially if you wrote it yourself.&lt;/p&gt;

&lt;div class="footnotes"&gt;
&lt;hr&gt;&lt;ol&gt;&lt;li id="fn:p9307723301-1"&gt;
&lt;p&gt;By “shape” I mean the external characteristics that separate, for
example, words from sentences, sentences from paragraphs, individual words from
quoted phrases, etc. Vim often refers to these as “objects” or &lt;a href="http://vimdoc.sourceforge.net/cgi-bin/help?tag=text-objects" target="_blank"&gt;“text
objects”&lt;/a&gt; which I find a slightly dull term. &lt;a href="#fnref:p9307723301-1" rev="footnote" target="_blank"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;&lt;/div&gt;</description><link>http://jonathan.jsphere.com/post/9307723301</link><guid>http://jonathan.jsphere.com/post/9307723301</guid><pubDate>Wed, 24 Aug 2011 01:12:00 +0300</pubDate><category>vim</category><category>taming vim</category></item><item><title>Taming Vim — 1. Introduction</title><description>&lt;blockquote&gt;
  &lt;p&gt;This is the first part in the series &lt;a href="/tagged/taming_vim" target="_blank"&gt;Taming Vim&lt;/a&gt;, a series focused on improving the intermediate &lt;a href="http://www.vim.org/" target="_blank"&gt;Vim&lt;/a&gt; user&amp;#8217;s understanding and operation of the text editor.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Preface&lt;/h2&gt;

&lt;p&gt;Firstly, I&amp;#8217;d like to thank &lt;a href="https://github.com/astrails/dotvim/blob/master/vimrc" target="_blank"&gt;all&lt;/a&gt; &lt;a href="https://github.com/tpope/tpope/blob/master/.vimrc" target="_blank"&gt;the&lt;/a&gt; &lt;a href="https://github.com/jnz/dotvim/blob/master/vimrc" target="_blank"&gt;people&lt;/a&gt; &lt;a href="http://amix.dk/vim/vimrc.html" target="_blank"&gt;who&lt;/a&gt; put their &lt;code&gt;.vimrc&lt;/code&gt; on the Internet, with comments for everyone else to learn from, these have been incredibly helpful. I&amp;#8217;d also like to thank Piet Delport for being patient with me and encouraging me to learn, &lt;a href="http://mithrandi.net/blog/" target="_blank"&gt;Tristan Seligmann&lt;/a&gt; for introducing me to Vim many years ago, and &lt;a href="http://blog.froztbyte.net/" target="_blank"&gt;JP Viljoen&lt;/a&gt; for suggesting I write this.&lt;/p&gt;

&lt;p&gt;Secondly, I feel it is important to state that my primary use for Vim is writing source code. Today source code is still text and many concepts apply equally as well to prose as they do to source code, if not better, so while not everything in this series may be relevant to prose there are still some general concepts that can improve programmers and writers alike.&lt;/p&gt;

&lt;p&gt;Finally, I write this as someone who, until recently, was generally frustrated with Vim and, to some extent, my own inability to adequately wield some of the power of this editor. I write this in an attempt to help the people who feel the same way.&lt;/p&gt;

&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Obvious as it may be, you&amp;#8217;ll want to mentally steel yourself for the fact that you will be doing a lot of reading in the process of widening your Vim knowledge. Following on from that, it is important to habitually consult &lt;code&gt;:help&lt;/code&gt; (&lt;code&gt;:h&lt;/code&gt; for short since you&amp;#8217;ll be typing it a lot) for any options or commands you encounter, &lt;em&gt;especially&lt;/em&gt; if you think you already know what they do.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118" target="_blank"&gt;Jim Dennis&amp;#8217; extremely comprehensive answer&lt;/a&gt; explaining the “Zen” of Vi is a great read, read it. If you find yourself doing something repetitive or lengthy (like deleting the text inside of quotes the long way) it&amp;#8217;s extremely likely that you can apply Jim&amp;#8217;s advice to greatly improve your productivity.&lt;/p&gt;

&lt;p&gt;My own &lt;a href="http://bazaar.launchpad.net/~jjacobs/+junk/dotfiles/view/head:/.vimrc" target="_blank"&gt;&lt;code&gt;.vimrc&lt;/code&gt;&lt;/a&gt; is available on Launchpad, along with my &lt;a href="http://bazaar.launchpad.net/~jjacobs/+junk/dotfiles/files/head:/.vim/" target="_blank"&gt;&lt;code&gt;.vim&lt;/code&gt;&lt;/a&gt; directory.&lt;/p&gt;

&lt;h2&gt;Color scheme&lt;/h2&gt;

&lt;p&gt;While the attractiveness of something&amp;#8217;s appearance is a deeply subjective topic, I cannot stress enough the importance of finding a color scheme that allows you to comfortably read large bodies of text for extended periods of time. Be wary of beautiful bright and colorful schemes like &lt;a href="http://winterdom.com/2008/08/molokaiforvim" target="_blank"&gt;Monokai&lt;/a&gt; for these may be the cause of eye fatigue.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve recently switched to &lt;a href="http://ethanschoonover.com/solarized" target="_blank"&gt;Solarized&lt;/a&gt;, as a programmer there is something comforting about a color scheme based on &lt;a href="http://ethanschoonover.com/solarized#features" target="_blank"&gt;practical facts&lt;/a&gt;. I suggest enabling the highest contrast mode for Solarized by adding &lt;code&gt;let g:solarized_contrast='high'&lt;/code&gt; (before the &lt;code&gt;colorscheme&lt;/code&gt; command) to your &lt;code&gt;.vimrc&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are &lt;a href="https://code.google.com/p/vimcolorschemetest/" target="_blank"&gt;many&lt;/a&gt; Vim color schemes to try on the Internet, Google is your friend.&lt;/p&gt;

&lt;h2&gt;Fonts&lt;/h2&gt;

&lt;p&gt;Like color schemes, fonts are deeply subjective and you should carefully weigh your own tastes against anyone else&amp;#8217;s opinion. I use Monaco (sans anti-aliasing) on my Mac and Consolas on my Windows machine, Dan Benjamin has &lt;a href="http://hivelogic.com/articles/top-10-programming-fonts" target="_blank"&gt;a good write up&lt;/a&gt; and there are also about &lt;a href="https://encrypted.google.com/search?q=programming+fonts" target="_blank"&gt;31 million&lt;/a&gt; other things on the Internet about programming fonts.&lt;/p&gt;

&lt;p&gt;I find it convenient to use a font size big enough to be comfortable to read even beyond normal typing distance but also small enough such that a vertical split, of a maximized OS window, leaves me with two windows at least 80 columns wide.&lt;/p&gt;

&lt;h2&gt;Fade to grey&lt;/h2&gt;

&lt;p&gt;Take your time deciding on a color scheme and font that feels comfortable (and attractive) to you. I encourage you to stray from the defaults and suggest trying a change for at least an hour before making a decision.&lt;/p&gt;

&lt;p&gt;In the next installment I&amp;#8217;ll talk about some Vim plugins and why they&amp;#8217;re worth using.&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/9227739351</link><guid>http://jonathan.jsphere.com/post/9227739351</guid><pubDate>Mon, 22 Aug 2011 02:31:00 +0300</pubDate><category>vim</category><category>taming vim</category></item><item><title>JSHint errors in your Vim quickfix window</title><description>&lt;p&gt;To use &lt;a href="http://jshint.com/" target="_blank"&gt;JSHint&lt;/a&gt; as your “compiler”  for Javascript files in Vim put this into &lt;a href="http://bazaar.launchpad.net/~jjacobs/+junk/dotfiles/view/head:/.vim/compiler/jshint.vim" target="_blank"&gt;~/.vim/compilers/jshint.vim&lt;/a&gt; &lt;sup id="fnref:p9163688573-1"&gt;&lt;a href="#fn:p9163688573-1" rel="footnote" target="_blank"&gt;1&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CompilerSet errorformat=%-P[jshint]\ Error(s)\ in\ %f:,%E%m.\ (line:\ %l\\,\ character:\ %c),%C%s%&amp;gt;,%Z
CompilerSet makeprg=jshint
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then you can do &lt;code&gt;:compiler jshint&lt;/code&gt; to set the compiler (although you might want to do that in an ftplugin) and &lt;code&gt;:make %&lt;/code&gt; to run the current file through JSHint and put any errors into your Vim quickfix window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: If using &lt;a href="https://github.com/jshint/node-jshint/" target="_blank"&gt;node-jshint&lt;/a&gt; then the error format is a little simpler:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m
&lt;/code&gt;&lt;/pre&gt;

&lt;div class="footnotes"&gt;
&lt;hr&gt;&lt;ol&gt;&lt;li id="fn:p9163688573-1"&gt;
&lt;p&gt;This assumes that “jshint” is an executable in your path that runs JSHint, adjust makeprg accordingly. &lt;a href="#fnref:p9163688573-1" rev="footnote" target="_blank"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;&lt;/div&gt;</description><link>http://jonathan.jsphere.com/post/9163688573</link><guid>http://jonathan.jsphere.com/post/9163688573</guid><pubDate>Sat, 20 Aug 2011 16:18:00 +0300</pubDate><category>vim</category></item><item><title>Easy PuTTY color themes</title><description>&lt;p&gt;Are the default PuTTY colors offending your sensibilities? Wish there was an easier way to apply a new theme than manually twiddling numbers or applying registry files and copying the changes to your existing PuTTY profiles?&lt;/p&gt;
&lt;p&gt;Me too.&lt;/p&gt;
&lt;p&gt;Which is why I wrote &lt;a href="http://bazaar.launchpad.net/~jjacobs/+junk/itermcolors2putty/view/head:/itermcolors2putty.py" target="_blank"&gt;a script&lt;/a&gt; to read an iTerm (or iTerm2) color file (.itermcolors) and import those colors to a PuTTY profile of your choice!&lt;/p&gt;
&lt;p&gt;Available from &lt;a href="https://code.launchpad.net/~jjacobs/+junk/itermcolors2putty" target="_blank"&gt;my Launchpad branch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Head over to the &lt;a href="https://code.google.com/p/iterm2/wiki/ColorGallery" target="_blank"&gt;iTerm2 gallery&lt;/a&gt; or &lt;a href="http://ethanschoonover.com/solarized" target="_blank"&gt;Solarized page&lt;/a&gt; to get started.&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/8826204532</link><guid>http://jonathan.jsphere.com/post/8826204532</guid><pubDate>Fri, 12 Aug 2011 19:47:28 +0300</pubDate><category>putty</category><category>theming</category></item><item><title>GidoGeek: How to make iCal play nice with Sparrow</title><description>&lt;a href="http://gidogeek.com/post/6037637963/ical-sparrow"&gt;GidoGeek: How to make iCal play nice with Sparrow&lt;/a&gt;: &lt;p&gt;&lt;a href="http://gidogeek.com/post/6037637963/ical-sparrow" target="_blank"&gt;gidogeek&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It’s no secret I love &lt;a target="_blank" href="http://itunes.apple.com/nl/app/sparrow/id417250177?mt=12"&gt;Sparrow&lt;/a&gt;. I’ve been using it since it was in beta and I’m a very happy customer.&lt;/p&gt;
&lt;p&gt;Abandoning Apple Mail for a third party e-mail application however does come with it’s quirks. Apple was nice enough to not respect the “Default e-mail reader” setting (which is in Apple Mail…&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://jonathan.jsphere.com/post/8167946162</link><guid>http://jonathan.jsphere.com/post/8167946162</guid><pubDate>Thu, 28 Jul 2011 14:05:23 +0300</pubDate></item><item><title>"In 1872 the Australians invented the condom, using a sheep’s bladder. However, in 1873 the English..."</title><description>“In 1872 the Australians invented the condom, using a sheep’s bladder. However, in 1873 the English somewhat refined the idea by taking the bladder out of the sheep first.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;@froztbyte&lt;/em&gt;</description><link>http://jonathan.jsphere.com/post/1114953148</link><guid>http://jonathan.jsphere.com/post/1114953148</guid><pubDate>Mon, 13 Sep 2010 13:40:33 +0200</pubDate></item><item><title>The Silver Lining: Episode 1 is now available! The Silver Lining...</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/pzDN6d03O3U?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;The Silver Lining: Episode 1 is now &lt;a href="http://www.tsl-game.com/" target="_blank"&gt;available&lt;/a&gt;! &lt;a href="http://en.wikipedia.org/wiki/The_Silver_Lining_(game)" target="_blank"&gt;The Silver Lining&lt;/a&gt; is a fanmade continuation in the King’s Quest series that has been in the making for 8 years, after getting shut down by Activision earlier this year, they came to some kind of agreement with Activision that saw The Silver Lining released on 10 July 2010.&lt;/p&gt;
&lt;p&gt;Yay! Adventure gamers rejoice!&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/800712076</link><guid>http://jonathan.jsphere.com/post/800712076</guid><pubDate>Mon, 12 Jul 2010 08:04:43 +0300</pubDate><category>games</category><category>indie</category><category>adventure</category></item><item><title>muppetpants:

This is one of those photographs that look real...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_l596mz35Q61qzrrsmo1_r1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://muppetpants.tumblr.com/post/790304611/seaforts" target="_blank"&gt;muppetpants&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is one of those photographs that look real but are tough to place within our reality.&lt;/p&gt;
&lt;p&gt;(by &lt;a href="http://flickr.com/photos/mrbeama" target="_blank"&gt;Beamtwenty3&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://jonathan.jsphere.com/post/795099144</link><guid>http://jonathan.jsphere.com/post/795099144</guid><pubDate>Sun, 11 Jul 2010 00:47:00 +0300</pubDate></item><item><title>Retro/Grade is probably the first shmup you’ll play in...</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/2Uj7IaNmxhs?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Retro/Grade is probably the first shmup you’ll play in reverse. Yes, in reverse. Reverse. Backwards. Or with a guitar controller. No, I’m serious.&lt;/p&gt;
&lt;p&gt;There’s a good &lt;a href="http://www.psnstores.com/2010/07/developer-interview-retrograde/" target="_blank"&gt;developer interview&lt;/a&gt; on PSNstores, now if only I had a PS3.&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/792468823</link><guid>http://jonathan.jsphere.com/post/792468823</guid><pubDate>Sat, 10 Jul 2010 08:13:42 +0300</pubDate><category>indie</category><category>games</category><category>shmup</category></item><item><title>Trailer for Joshua Nuernberger’s forthcoming “Gemini Rue”...</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/Yh2YYDcfT1Y?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Trailer for &lt;a href="http://twitter.com/thejburger" target="_blank"&gt;Joshua Nuernberger&lt;/a&gt;’s forthcoming “Gemini Rue” adventure game.&lt;/p&gt;
&lt;p&gt;I’m an adventure game nut, spending most of my childhood gaming on the Sierra classics. Joshua’s game looks atmospheric and gorgeous, quite possibly rivaling Sierra in the genre they built. I cannot wait to play this!&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/788206007</link><guid>http://jonathan.jsphere.com/post/788206007</guid><pubDate>Fri, 09 Jul 2010 08:12:43 +0300</pubDate><category>indie</category><category>games</category><category>adventure</category></item><item><title>Puppy Games' Revenge of the Titans</title><description>&lt;a href="http://www.puppygames.net/revenge-of-the-titans/"&gt;Puppy Games' Revenge of the Titans&lt;/a&gt;: &lt;p&gt;Puppy Games (makers of the fantastic &lt;a href="http://www.puppygames.net/titan-attacks/" target="_blank"&gt;Titan Attacks&lt;/a&gt;, which I played the hell out of) have recently released a beta of their upcoming game Revenge of the Titans, a kind of tower defense and RTS mashup with a distinct Puppy Games flavour.&lt;/p&gt;
&lt;p&gt;The beginning levels are short, slow and boring but things ramp up quickly and soon there is a stampede of hopping space-invader-esque aliens rallying to chew on your towers like a pack of ravenous puppies.&lt;/p&gt;
&lt;p&gt;Unlike most tower defense games there is not a fixed route the aliens will travel along, instead they head in only a vague direction (sometimes using roads to travel vast empty spaces more quickly) and will disperse as they reach your outpost, sometimes swarming around small defense outposts.&lt;/p&gt;
&lt;p&gt;Building up your defenses requires resources, resources that can be acquired from alien kills, random pickups (think Command &amp; Conquer crates) but are found most abundantly by harvesting minerals. After each mission you pay a visit to the R&amp;D department to drop your dollars on researching new ways of making your life better, ranging from automating tedious manual tasks (reloading, collecting harvested minerals, etc.) to improving firepower, to learning about your enemy (and thus making your weapons more potent.)&lt;/p&gt;
&lt;p&gt;The music is fantastically atmospheric and the visuals are simple but beautiful. As with every other Puppy Games product, the game is available for Windows, Mac and Linux and is definitely worth playing, even if only to wile away a few hours of the work day.&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/783986771</link><guid>http://jonathan.jsphere.com/post/783986771</guid><pubDate>Thu, 08 Jul 2010 08:12:00 +0300</pubDate><category>indie</category><category>games</category></item><item><title>I’ve always been a fan of the Mortal Kombat series but I...</title><description>&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="242" id="viddler"&gt;&lt;param name="movie" value="http://www.viddler.com/simple_on_site/1db1bcb5" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="flashvars" value="fake=1" /&gt;&lt;embed src="http://www.viddler.com/simple_on_site/1db1bcb5" width="400" height="242" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" flashvars="fake=1" name="viddler"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I’ve always been a fan of the Mortal Kombat series but I think we can all admit that there have been far more misses than hits. Fortunately the new game makes a return to a 2D fighting plane, over-the-top jumping and adds tag teams and / or team battles.&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/779807573</link><guid>http://jonathan.jsphere.com/post/779807573</guid><pubDate>Wed, 07 Jul 2010 08:11:43 +0300</pubDate><category>mortal kombat</category><category>games</category></item><item><title>Imagine if the choices in your world were .NET or Java…...</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/A1zySeNpW20?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Imagine if the choices in your world were .NET or Java… How many ways are there to commit honourable suicide again?&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/775577872</link><guid>http://jonathan.jsphere.com/post/775577872</guid><pubDate>Tue, 06 Jul 2010 08:10:42 +0300</pubDate><category>comedy</category><category>coding</category></item><item><title>Video game idea: Fall or Die Trying</title><description>&lt;h2&gt;Concept&lt;/h2&gt;
&lt;p&gt;Guide a small ship, dropped from the mothership in orbit, hundreds of miles down a massive fissure to detonate a cataclysm device at the planet&amp;#8217;s core. The faster you fall the faster your shields recharge, braking is accomplished by rubbing against the edges of the fissure but will cost you shield power. As you approach the core the fissure narrows and your shields strain against the immense temperatures.&lt;/p&gt;
&lt;h2&gt;Knowns&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Falling gives you score.&lt;/li&gt;
&lt;li&gt;Accelerating beyond the pull of gravity increases score gain.&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Unknowns&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Pickups / powerups.&lt;/li&gt;
&lt;li&gt;Time limits.&lt;/li&gt;
&lt;li&gt;Ability to detonate the cataclysm device at any point during the fall.&lt;/li&gt;
&lt;li&gt;Ship upgrades.&lt;/li&gt;
&lt;li&gt;One attempt per planet: Proceed to later tiers by performing satisfactory amounts of planetary destruction in your current tier.&lt;/li&gt;
&lt;li&gt;Moral decisions: Option to decline missions that involve populated planets.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Did I miss something?&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/771646870</link><guid>http://jonathan.jsphere.com/post/771646870</guid><pubDate>Mon, 05 Jul 2010 08:10:42 +0300</pubDate><category>game idea</category><category>games</category></item><item><title>Video</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/W_ZDNTIJAF4?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://jonathan.jsphere.com/post/767985600</link><guid>http://jonathan.jsphere.com/post/767985600</guid><pubDate>Sun, 04 Jul 2010 08:09:42 +0300</pubDate><category>udk</category><category>physics</category></item><item><title>Hah! So awesome.</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_l4caqjcIZ51qzolrpo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Hah! So awesome.&lt;/p&gt;</description><link>http://jonathan.jsphere.com/post/764304432</link><guid>http://jonathan.jsphere.com/post/764304432</guid><pubDate>Sat, 03 Jul 2010 08:09:43 +0300</pubDate><category>meme</category><category>cat</category></item></channel></rss>

