Posts concerning Vim


17:39 27 Oct 2013

I’ve been blogging regularly since 01 August 2006: every day for that first year, five times per week for four years after that, and at least once per week since 01 August 2011. Now it’s time for a break.

Permalink     5 Comments     [, , , , , , , , , , , , , , , , , , , , , , ]    

Tools for Writing reStructuredText in Vim

22:43 07 Oct 2012. Updated: 21:55 25 Oct 2012

I switched to writing in reStructuredText in mid-2009, and to writing in Vim in early 2010. Since then I’ve made a lot of tweaks to improve editing efficiency, and eventually collected these in a Vim plugin (and a Python script). The following discussion of that plugin might be of interest to anyone concerned with writing efficiency and/or editor customization.

Permalink     1 Comment     [, , , , , , , , , ]    

Vim and tmux in OS X

12:30 26 Aug 2012

I’ve been experimenting with using terminal Vim[1] in a tmux environment recently. I like it as a programming setup, primarily because of the ease with which I can set up new workspaces[2] and switch between them—without, of course, having to move my hands off the keyboard. I did encounter some annoyances along the way, and my solutions for them are included below.

Permalink     Comment     [, , , , , , ]    

New Laptop Setup Steps

23:54 12 Aug 2012

I haven’t written about how I configure a new machine since mid-2007, so this will be both about the new setup and about how it compares to that one.

The new machine is a Mac laptop running Mountain Lion, as opposed to the Windows desktop I set up five years ago[1].

Permalink     1 Comment     [, , , , , ]    

Blog Features I Want

22:44 11 Mar 2012

A discussion of common and custom blog features, and candidate applications that might provide them.

Permalink     2 Comments     [, , , , , , , , , , , ]    


23:42 24 Mar 2011. Updated: 01:43 25 Mar 2011

Pentadactyl is an add-on for Firefox that allows for keyboard-focused interaction with the browser by providing Vim-like keybindings. If you’re at all interested in browsing with the keyboard instead of the mouse, you should try it out.

Permalink     1 Comment     [, , , ]    

Punctuation, Typography, and Vim

22:28 31 Jan 2011. Updated: 10:39 26 Mar 2011

I’ve cared about typographically correct punctuation (as well and as distinct from grammatically correct punctuation) for as longer than I’ve had a computer. The difference between typical home computer output (and display) and typography as seen in books was always glaringly evident, and I wanted to narrow that gap as much as possible. This post is a discussion of some of the issues, how I’ve handled them in the past, and my current approaches.

Permalink     4 Comments     [, , , ]    

Fun with pandoc, Vim, and email

23:52 21 Jan 2011. Updated: 01:35 22 Jan 2011

I’ve mentioned pandoc once before, and it’s again proved rather useful. I’ve been looking for more ways to use it, as I love its core principle (although I naturally wish that it focused on reStructuredText rather than Markdown) of being a comprehensive text format converter. It might at one point be the answer for getting from reST to PDF—something that the current reST tools don’t help me with because I insist on using Unicode, and XeTeX isn’t yet supported. But today pandoc helped with a different task: going from reST to plain text.

Permalink     1 Comment     [, , , , , , , , , ]    

Vim Golf

17:59 28 Dec 2010

That’s right, a competition to do edits in Vim in a few keystrokes as possible. I haven’t even installed it yet and I’m sure it’ll eat large chunks of my time.

Permalink     3 Comments     [, , , ]    

Minor Achievements

20:36 18 Oct 2010

Sometimes it’s the little things that make life better, the small victories in ongoing daily battles.

I recently did an overhead squat at 185 pounds (or about 84 kilos, or 13 stone 3); I weigh a little under 180 (that day, 178 pounds) and so that was a bodyweight overhead squat. It actually represents two achievements, because in order to get the bar into the overhead position, I had to push jerk it from behind my neck to locked out above my head, which counts as my best push jerk ever, albeit an unorthodox one. From the overhead locked out position, it’s down into a deep squat and back up; the harder part for me was going down, as once I was at the bottom it wasn’t hard to keep my balance coming back up.

Permalink     1 Comment     [, , , , , , , , , ]    

Some Tidbits from my .vimrc

21:44 07 Oct 2010. Updated: 03:54 30 Dec 2010

These aren’t anything particularly major, just some things I’ve found to improve my editing experience.

Permalink     2 Comments     [, , , , ]    

Adjusting Keyboard Shortcuts

23:17 27 Sep 2010

This post is about keyboard shortcuts, remappings, application switching, and a little bit of workflow, primarily in the context of OS X and Vim, so it might not be of interest to all readers.

Permalink     3 Comments     [, , , , ]    

MacVim 7.3

23:09 20 Sep 2010

I’ve been slow in upgrading to MacVim 7.3, which came out about a month ago. I’m happy with it, but there are only a couple of features that really matter to me so far:

  • colorcolumn
  • Python 2.6 support.

colorcolumn lets you specify columns that will have a different background color—this is primarily useful for source code where you want to stick to line length limits. This is one of the few features I was still missing from jEdit, although I think jEdit’s solution was nicer: in jEdit the visual line was thin and went between the columns, so between columns e.g. 79 and 80 you could have a line; in Vim 7.3 either column 79 or 80 would have a “line”, i.e. a different background color. Still better than the kludge I use now, though.

Python 2.6 support is nice due to the number of Python scripts I’ve written for Vim, which used to have to be compatible with Python 2.3. The main things I really like here are the ability to use .format on strings, conditional expressions, built-in set support, and generator expressions. That list is inspiring me to edit some of my old scripts right now.

Permalink     Comment     [, , , , ]    

Some Futurist Speculation on Screen Interfaces

23:52 28 May 2010

The current interface upheaval is centered on touchscreens. I think this is an important step, and one which may allow for some significantly different interaction paradigms to emerge. I wonder how long touchscreens will remain dominant, however, even though the interfaces they help spawn may stick around for a long time.

Permalink     2 Comments     [, , , , , ]    


23:36 16 May 2010

After a highly enjoyable, productive, and extended period, it’s time for me to return to the world of paid work.

I’m quite happy with the things I’ve done during my time off. Many of them are important only to me, but then, it’s been my time off.

Permalink     3 Comments     [, , , , , , , , , , , , , , , , , , , , , ]    

Improving a Python Word Counting Function

13:33 29 Apr 2010

This post could be summarized as “regular expressions are a lot faster than naive for loops”.

I’ve been working on improving the script I use for live wordcount in Vim, partly for performance and partly so that I can package it up as a plugin and share it with other people. Along the way I’ve improved the speed of the script rather significantly, and will go through the key part of that change here.

Permalink     1 Comment     [, , , , , , ]    

Thunderbird, Muttator, and Filters

11:17 18 Mar 2010

Not content with merely using Vim to compose email messages, I’m trying out Muttator, a Thunderbird plugin that aims to add Vim-like keybindings.

Permalink     Comment     [, , , , , ]    

Using Vim with Thunderbird

12:24 12 Mar 2010. Updated: 19:06 14 Mar 2010

It’s possible to get Thunderbird to use Vim as an external editor for email, and while it’s a little clunky, it works.

Permalink     Comment     [, , , , ]    

Vim: the Killer Instinct of Text Editors

23:45 04 Mar 2010. Updated: 00:47 05 Mar 2010

I played Killer Instinct a lot in the mid-90s. It didn’t have the multiplayer depth of Super Street Fighter II Turbo, but I wasn’t playing it multiplayer much—rather, I was trying to get the longest combination move I could.

But what does this have to do with text editing?

Permalink     2 Comments     [, , , , ]    

:imap jj <Esc> and :Bclose in Vim

13:24 22 Feb 2010. Updated: 03:56 30 Dec 2010

I remain rather happy with Vim, and it’s already been worth the effort of switching over to it. I’ve encountered some annoyances along the way; here are a couple of them and some solutions.

The first is that I quickly found myself wanting to exit Insert mode very frequently and not liking the stretch from my typical hand position to the Esc key. I know that some people insist that the only way to deal with this is to remap CapsLock to Esc, while others remap CapsLock to Ctrl and use Ctrl-C instead of Esc to get to Normal mode. Neither of these approaches appealed to me. Seth reminded me about another approach, one I thought would be too awkward: mapping jj to Esc within Vim.

Permalink     Comment     [, , ]    

Some Vim Script Implementation, Testing, and Hackery

23:50 16 Feb 2010. Updated: 00:57 17 Feb 2010

As a result of my porting over jEdit (Jython) macros to Vim, I now have a fair amount of (Python) Vim scripts, and have learned some things about how to set up those scripts. I’ll go through some of that below, and hopefully other people writing Python scripts for Vim will find it useful.

Permalink     1 Comment     [, , , , , , ]    

First Post With Vim

20:05 14 Feb 2010

Over the last couple of weeks I’ve been hacking away on scripts to customize Vim, replicating the scripts I made for jEdit. I’m more or less done, and this blog post is being written in MacVim. This hopefully means that when I’m done with it I’ll be able to publish it from within Vim, the same as with jEdit.

Permalink     1 Comment     [, , , , , , , ]    

Better Word Count in Vim

23:40 17 Jan 2010

I’m currently trying out Vim (again), and have made more progress this time, mainly due to Seth’s help. The key things that have made it better:

  • :set hidden. Absolutely critical, this. Stops Vim from complaining when you try to switch buffers and your current buffer has unsaved changes.
  • bufexplorer. Makes switching buffers a lot easier.
  • A better Python syntax file. I didn’t like the defaults.
  • My own indentation and syntax files for reStructuredText.

Really, though, the key first one was :set hidden. Before that I felt that I had completely misunderstood Vim’s file management model.

Permalink     1 Comment     [, , , , , , , ]