My new favorite vim mapping

Ovid on 2006-06-15T13:19:36

Typically when I set up vim on a new box, I install this nifty little buffer explorer. Then I just type \be and scroll to the buffer I want. Now I'm working on a box where that buffer explorer doesn't work -- it keeps saying "Trailing characters" and no one is sure why. Then when someone pointed out the :ls command, I thought about it and came up with this:

noremap ,j :ls:e#

Now I just hit ,j ('j' for "jump") and type the number of the buffer I want. Very handy!

Update: Smylers (a coworker) informs me that the reason for the buffer explorer plugin failing was the keepjumps keyword which is used in the plugin. It's from 6.3 but we're using 6.1. Changing this:

command BufExplorer keepjumps :call StartBufExplorer(0) 

... to this ...

command BufExplorer :call StartBufExplorer(0)

... fixes the problem.

In other news, it's very annoying learning the subtle differences of typing on a British keyboard.


Yeah, those keyboards are annoying.

grantm on 2006-06-15T21:16:47

In other news, it's very annoying learning the subtle differences of typing on a British keyboard.

Because double quotes were meant to be hard to type :-)

I lived in the UK for a few years and brought my UK PC back to New Zealand. The US layout in the norm here and I really should have just bought a new keyboard but I never got round to it. So for years my keyboard layout at home was different to the one at work.

The other annoyance was the right hand Alt key being reserved for entering accented characters. At least I was able to turn that off with keyboard mapping.

Vim 7 and omnicompletion for Perl

SuperCruncher on 2006-06-16T07:44:03

It's from 6.3 but we're using 6.1.

Vim 7 is very nice -- it's got quite a few new features such as spell checking (it's quite nice to be able to have your Perl comments and POD spell checked), omni completion (aka Intellisense) and undo branches.

Unfortunately, to get the best out of omnicompletion, we need a specific Perl implementation instead of just using the syntax omni approach.

I think Perl coders who use Vim should get together and try to code one.