Skip to content

Archive

Archive for August 22nd, 2009

Ah, now this is complete bliss… I’m writing to you straight from within MacVim using the blogit.vim script. Up until now, the best way I could use Vim to write up on this site was to use MacVim‘s great little feature of hacking Cocoa to allow you to edit any NSTextField natively within the MacVim session. But now, I can just write straight within MacVim and then publish directly from here.

I owe a big thanks to Romain Bignon for this one. Excellent plugin!

Snapshot 49 is out! Thanks a lot, Björn and supporters for this great version of Vim for the Mac. Well done.

I use Vim mostly at work on Windows (don’t even get me started on that lovely O/S), working on two different machines – my desktop and my laptop – neither of which are backed up. That presents a couple of problems:

  • How do I keep the two machines up to date with each other?
  • How do I avoid the death crash from hell?

I solve both of those problems with one move – keep the configuration in Perforce. Now, I’m not a huge fan of Perforce but it’s all I’ve got at work, and it certainly does the job when I want to solve these problems. You don’t need much to handle this issue so any version control system should do (so long as the repository is remote and backed up for you, of course :D).

Once you’ve set up your Vim files into your version control system, you just need to tell Vim where they are.  You do this with the $VIM environment variable (or %VIM% if you’re on Windows and you just want to be really pedantic about the details :D).  You don’t need to do this, of course, if your version controlled Vim files map to the same place as Vim would normally look, but in my case they map to somewhere really weird so I need to help Vim out by telling it where the files are.

Then it’s just like versioning any other piece of code.  Check config files out, modify them, check them in, sync them to other machines.  Normally I work on my desktop box, so the first thing I do when I power up my laptop is p4 sync my Vim configuration so I can get the exact same experience as I had on my desktop, right away.

Switch to our mobile site