noVIMber: Automating tasks with VIM

November 23, 2009

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’s tip, I’m [...]

Read the full article →

noVIMber: Seeing the unseeable with VIM

November 20, 2009

This is why ninjas are scared of VIM – 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 indicate the bodies of [...]

Read the full article →

noVIMber: This ain’t your momma’s undo

November 19, 2009

Like most modern applications, VIM has an undo/redo feature.  As you’re
typing along, you might realize that you’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:
<CTRL>+r
or
:redo
And the last change will be [...]

Read the full article →

noVIMber: Flexible and powerful VIM macros

November 19, 2009

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 put [...]

Read the full article →

noVIMber: Adding a little color to your day with VIM

November 17, 2009

VIM supports syntax highlighting of a lot of different types of files,
from C code to Apache configs. To make sure you’re using the syntax
highlighting, execute the following command:
:syntax on
If the highlighting doesn’t appear, you may need to tell VIM what kind
of file it is you’re editing:
:se filetype=apache
Typing “:filetype” and hitting <ENTER> will tell you what [...]

Read the full article →

noVIMber: Using markers in VIM

November 16, 2009

“m” marks the spot.
If you find your self jumping back and forth in different locations in a
file, you might find using marks to be a performance booster.
When you have the cursor in a location that you plan to return to, drop
a mark by typing:
ma
That creates a mark named ‘a’ under the cursor.  Just like with
registers, [...]

Read the full article →

noVIMber: Doing more with less in VIM

November 15, 2009

One of the central philosophies of VIM is to get more done with fewer
keystrokes.  There are features built into VIM such as templates,
macros, and completion that are designed to minimize the typing you have
to do when working in structured files.  Because when you think about
it, there are only so many keystrokes you are going to [...]

Read the full article →

noVIMber: Finding the cursor in VIM

November 14, 2009

VIM’s syntax highlighting can be very cool, but sometimes all the colors
on the screen can make it difficult to track where your cursor actually
is. Usually this isn’t a big deal – just wiggle the cursor around with
a bunch of jkjkjk keystrokes and you can find it – but VIM’s got a
couple of settings that [...]

Read the full article →

Personal Paparazzi: Managing Social Media work/life bleed-over

November 13, 2009

Techintwenty.com interviewed me on the topic of managing a work/life balance especially in context of using Social Media in private life and work life. Main takeaway from me: participating in Social Media is opt-in and by doing so we become our own personal paparazzi, exposing ourselves in our private lives.

A special thanks to @epodcaster and [...]

Read the full article →

noVIMber: Fun with registers in VIM

November 11, 2009

VIM provides several registers that can make editing a lot easier.  A
register is analagous to a clipboard, except that instead of just having
one, you’ve got several.  There are twenty-six “normal” registers, each
named after a letter of the alphabet, and a few “special” registers
which might get dealt with in a later tip of the day.
The registers [...]

Read the full article →