Making MacVim open files in vertical splits

August 4, 2011  |  Tags: ,   |  

When coding, I like to use MacVim with PeepCode’s little PeepOpen app as my auto-completing filename browser. It’s like TextMate’s Cmd-T “Go to file” functionality, and it’s awfully fast and convenient.

One problem I’ve had, however, is that MacVim’s preferences (as at snapshot 61)* only allow you to open files from other applications (in this case, PeepOpen) in the same window, a new tab, or in a horizontal split. Here’s how you set MacVim to open files in vertical splits — open a terminal, and enter:

defaults write org.vim.MacVim MMVerticalSplit YES 

While I’m at it, here’s another useful one: this link shows you how to edit mvim, the command line script to open MacVim, so that it doesn’t open new windows when called multiple times from the command line.

* There’s a pull request to make MacVim’s “open files” preference a bit more sensible: in a new window, in the current window, in tabs, in horizontal splits or in vertical splits. Hopefully this makes it into future builds, because seriously, who the hell understands “open files and set the arglist” as “open in current buffer”?

A preference pane to let you hide useless apps from your Lion Launchpad. Excellent remedy for stupid apps Launchpad finds, such as:

  • Microsoft Office Setup Assistant and Clip Gallery
  • Adobe Flash Player, Flash Player and Flash Player Debugger
  • Adobe Uninstall Photoshop CS5, Uninstall Illustrator CS5 and Uninstall Flash CS5
  • naib, naib and naib (with, unsurprisingly, Adobe icons)

WTF, Adobe.

My parents’ Mac mini is their media centre — it’s hooked up, via a ridiculously long ethernet cable, to a modded (classic) Xbox in the living room running a horrendously outdated early build of Xbox Media Centre (now XBMC).

With my usual cautious upgrade habits, I updated the Mac mini to Lion the day after release. (What? It was a whole day!) It installed fine, but broke media sharing between that and the Xbox, as Apple had dropped Samba networking from Lion (should’ve read this article earlier). For current XBMC users, this shouldn’t be a problem, as newer builds should be able to read NFS shares… but my super-old box is super-old and not conventionally upgradeable*. Thankfully, someone figured out how to fix it by reinstalling the samba3 package, and I’m just reposting the link here in case anyone needed to stumble across this solution.

(The media centre used to be a Linux desktop, until the fan broke and I got tired of fixing X11 problems every 3 weeks. A slight pity, though, that I can no longer tell people my parents use Linux.)

* I vaguely recall that these builds weren’t legal, and I had to FTP into some secret server after jumping through a few hoops to find a username and password. Fun times. Also, nobody cares about the legality of modding the original Xbox any more, right? …right? Umm.