Chris Metcalf bio photo

Chris Metcalf

specialization is for insects

Twitter Facebook LinkedIn Instagram GitHub Stack Overflow SmugMug

Or to rule your Mac OS X spaces, at least. I’ve always hated the “vim cruft” that tends to accumulate on one’s machine. I try to keep my Linux virtual desktops or my Mac OS X Spaces partitioned off by topic or activity, but that tends to break down after a few days of hacking. Finally inspried by nicoe’s One vim server per desktop post, I ported his solution from Linux to OSX and ended up with the following script: It relies on Tom Feist’s little “spacefinder” utility, which basically dumps out the number of the current space that you’re on. I wrote up a Homebrew recipe, in case that’s how you roll. If you save it as a shell script somewhere in your path, it’ll automatically spawn a new MacVim server instance the first time you vim in a given space, and then force all subsequent opens to that same MacVim server. Neat stuff.