There was a complaint on Hacker News that there were too many posts about text editors for a site that purported to be about tech and startup news. Someone replied with a quote (mis-attributed to Picasso, but findable with some googling) that “When art critics get together, they talk about Art. When painters get together, they talk about where to buy good turpentine.”
So, here’s my first turpentine post. I’m convinced that while it’s fun to talk about editors, they also serve as a distraction. Making your current editor flashier, or searching for new flashier editors is time spent not doing other useful work. I forgive myself the indulgence, though, because I recognize it as an indulgence and I enjoy it.
At some point when I was doing more system administration-type work, I settled on using vim, because it was pretty easy to use across different terminal emulations and network connections. Before that I had used emacs, but I just couldn’t stand having to hit
ESC as a replacement for
META under some circumstances and not others. More recently, I’ve been doing more coding work, and have been using TextMate and Sublime Text 2. They come with features and plugins that stock vim doesn’t have, but I kept reading about how those features existed in various plugins.
One of the advantages that TextMate and ST2 have is that there are integrated package systems. vim didn’t have that, but then I saw a nice post about Janus, which is basically a cookie-cutter pre-configured
.vimrc and associated packages. It comes with NerdTree, which is akin to the project drawer, and Ctrl-P, which is like TextMate’s C-T fuzzy finder, or ST2’s Command-P fuzzy-finder. It also has various ack/ctags/git features that are nice for programming.
More interesting to me, though, are the packages that build on classic vim strenghts. I love the fchar command for moving forward in the line to the next instance of char. EasyMotion takes that functionality and puts it on steroids, letting you alphanumerically select which of the next 51+ (a-z,A-Z, with Z being used to say “I want to pick out of the next 51, please”) instances you want to move to. This is one of the vim-specific commands that I miss when I’m in an editor that doesn’t have the normal/insert-mode split.
Installing the Janus setup is as easy as a git clone. However, it requires vim 7.3+, while the vim on MacOS 10.6 is at 7.2. Installing the newer version was a “brew install macvim” away, but that gets you macvim, a GUI layer on top of vim. In practice, if I’m using a GUI editor right now, it’s ST2. I use vim when I don’t want to leave the terminal I’m in to do some editing. No problem, though, because the underlying vim that macvim sits on top of is available at
/usr/local/Cellar/macvim/7.3-64/MacVim.app/Contents/MacOS/Vim. I have aliased vim to that, and also set SVN_EDITOR and made my git config core.editor point to that too. Otherwise, if you use the
/usr/bin/vim as your commit editor, you will get failures because some of the 7.3-requiring plugins make 7.2 vim exit with exit code 1, even though all the editing was successful.