Column mode in GVIM using the Alt key

Whilst writing my last post regarding column mode in Putty, I got thinking about which other apps might use this convention (alt key and mouse) for column mode. The first (and in fairness only) app I tried was Vim (the GVIM flavour).

I love Vim. Rarely does a week go by that I don’t learn some new trick with Vim. However by far my biggest gripe regarding Vim compared to my previous editor of choice (UltraEdit) is it’s column mode.

Generally speaking – unlike much of Vim (arguably) – column mode isn’t very intuitive to use. It’s a big enough pain that I simply don’t use it (I’ve tried to get in the habit on several occasions now). However, with the help of the alt key (as seen in the Putty post [LINK]), it’s slightly easier (at least as far as I’m concerned).

Unlike with Putty where I’m using it to select and copy text, with GVIM I’m using it to insert text.

How to use Column Mode in GVIM using the Alt Key

Note that this example is for GVIM only. Not the terminal version of Vim.

  • Place the cursor:
    • On the first line that you wish to insert text to
    • In the column that you wish to insert your text
  • Now hold down the alt key and place the cursor:
    • On the last line that you wish to insert text to
    • In the column that you wish to insert your text.
  • This should ‘draw’ a line from your top point to the bottom (see below)

  • Start typing the text you wish to insert. Initially this will appear only on the first line (I find this to be misleading, and it’s one of the reasons I dislike Vim’s column mode)

  • Now press escape. You should now see the remaining columns update:

Vimium – Vim inspired shortcuts for Chrome

Yet another reason for me to switch to Google Chrome:

The Hacker’s Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.

Via https://chrome.google.com/extensions/detail/dbepggeogbaibhgnhhndojpepiihcmeb

As I’m using Vim more and more lately, I find my self incorrectly j/k’ing to go up and down. This would help with that.

I’ve had a play around with it and it really feels natural to use.

The thing preventing me from switching to Chrome though is still the lack of vertical tabs. I realise you can use it as a test feature, but it’s totally inadequate when compared to the Firefox addons out there.