Jack Baty - the archives

Years of jackbaty.com - archived

Octopress, Janus, and Zsh

It doesn’t take much for me to completely reverse direction. Not long ago I loudly proclaimed that the command line and I were going our separate ways. “I’m too old to remember all of those damn commands!” I said. “Tweaking my Vim and bash settings are nothing but a waste of time!” I snorted.

Do you know what I did yesterday? I switched my shell to zsh, installed Janus, and moved my blog back to Octopress. It was so much fun I didn’t know when to quit, so I didn’t.

Octopress

Octopress is a very nice wrapper for Jekyll, but anything ruby related tends to cause me grief. It was no different this time. Of course I didn’t have rvm configured so I started there. Xcode was somehow either too old or otherwise broken and so I would get errors when running bundler. Gave up and updated the ginormous Xcode install and then ran this…

terminal
1
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/

…which allowed me to finish installing Octopress. There’s something wrong with the combination of having system ruby at 1.8.3 or whatever and new Ruby apps wanting some other version. Rvm is supposed to fix this, but for someone like me who only dabbles in Ruby these days, it’s a pain in the ass.

Converting the posts from my Wordpress blog was made possibly by exitwp which converted each post to Markdown and added appropriate YAML front matter to each file. I know, I’ve gone through this before but this time it coincides with my newfound love for the terminal and text files. Besides, I love having everything I’ve written on this blog since 2000 safely stored in 1700+ portable markdown files sitting in a folder on my computer. I’m using the default Octopress theme with a few tweaks to the header and I like it.

ZSH

The last thing someone who’s sworn off the terminal should to is change their shell. I did it anyway. After hearing so many good things about Z shell I have been tempted to try it, but up until yesterday had backed away slowly. While tinkering, I ran into oh-my-zsh, which makes getting a fully configured zsh install easy. I just did this…

terminal
1
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

The tab completion in zsh alone is worth the price of a ticket.

Janus

The urge to tinker with Vim’s configuration can chew through most of a developer’s life if left unchecked. It’s fun and addictive, though. I love finding some obscure setting that suddenly makes one task or another easier. I’ve got a few years into my configuration, and just threw most of it out due to Janus. Janus is a distribution of plugins, key mappings etc. for Vim and MacVim. It pulls in the best of thousands of plugins and configures them in a consistent, simple way. Anything can be overridden, so it works as a nice clean head start. Installation is a matter of running one command…

terminal
1
curl -Lo- http://bit.ly/janus-bootstrap | bash

I still symlink my dotfiles into a dropbox directory so changes on one machine are automatically included on the others. I could use Git for this, and probably should, but so far the Dropbox sync works pretty well. Plus, I don’t have to remember to push anything.

All of this has been a great deal of fun, and of course I keep learning things each time I go through the process. Onward!