OS X Development Setup

This is a general summary of the tools I use for development on OS X. This will probably be updated from time to time as I add new tools (and also remember to update it).

Core Utilities

Homebrew

You pretty much can’t be a Mac power user without Homebrew, right? If you don’t know, it’s a great package manager for OS X. Follow the instructions there and then going forward you can just brew install just about anything. I use it to install pretty much any non-OS X-specific package I use.

Fonts

I use Inconsolata as my preferred font in both my text editor and my Terminal. As their website says:

It is a monospace font, designed for printed code listings and the like. There are a great many “programmer fonts,” designed primarily for use on the screen, but in most cases do not have the attention to detail for high resolution rendering.

Better than I could put it myself…

Terminal/Shell

iTerm2

I use iTerm2 as my primary terminal. As someone who spends a lot of time in the terminal, I find its features are many steps above the default OS X Terminal.app.

I’d recommend creating a new default profile and modifying a few settings, too. For me, I set the window size (rows/columns) to a useful value based on how I use my screen. I always slience the bell. And I would highly recommend setting unlimted scrollback buffer - nothing’s more frustrating that not being able to scroll back far enough for that one key line of output.

ZSH

My preferred shell is ZSH. It’s more robust than Bash - countless things have been written around the web about people’s shell preferences, I won’t prattle on more about that here. You can install ZSH via Homebrew.

oh-my-zsh

oh-my-zsh is a great set of ZSH plugins that offers all kinds of useful tab completion items, git integration, and much more. Check out the site and follow the installation instructions. My preferred shell theme is crunch at the moment - but I will probably change my mind if you ask again tomorrow.

tmux

OK, this is cheating a bit, because I don’t actually use tmux on my Mac. But I use it on pretty much any machine I SSH to. Tmux is short for Terminal Multiplexer; it’s a utility that enables you to maintain multiple “screens” and keep a session going across SSH connections. It’s very similar to screen, another utility of which you may have heard. Tmux is great for:

  • Keeping long-running scripts going even if you lose your SSH connection (or have to disconnect because it’s time to go home).
  • Maintaining a “standard” session on a remote machine. For example, I have a machine where I keep a tmux session always ready with 2 different bash shells and 2 different other screens tailing useful log files
  • Sharing sessions - one user can connect to another’s tmux session (assuming the file storage is in an accessible location) and it can be used for shell screen sharing

Tmux is infinately configurable. My Dotfiles project has good view of the base config that I use.

Editors

Sublime Text

Sublime Text is a widely used programmer’s editor for a good reason - it’s great. It’s very extendable, but feature rich just by itself. I’m using Sublime Text 3 beta currently and highly recommend it. There’s a few helpful things to learn/tools to use with it…

  • Package Control - This is the number 1 thing to add to your Sublime install. It’s a package manager that links to a repo with tons of useful extensions/add ons for Sublime. Some that I use:
  • SublimeLinter - This is a base package with many subpackages for Linting whatever you might be using
  • PathTools - Handy shortcuts for copying file paths
  • SublimeGit - Great GIT integration right into Sublime
  • WakaTime - Tracker giving you weekly reports on what lanaguages/projects you’re spending your time on
  • Themes - Like any editor, it’s themeable. I use Soda Dark as my theme Monokai Soda as my color scheme.
  • The Greatest Feature Ever Invented - Multi-cursor. I continue to find new uses for this!
  • Some Useful Configuration - Here are a few things I’d definitely recommend adding to your configuration. You can see my full configuration in my Dotfiles project.
  {
    "detect_indentation": true,        # Does what it says
    "draw_white_space": "all",         # Shows all whitespace. All programmers should always use this!
    "highlight_line": true,            # Highlights the curent line in the UI
    "highlight_modified_tabs": true,   # Shows a bug on the tab ofr any unsaved files
    "show_full_path": true,            # Shows the full path to the file in the title bar
  }

vim

Everybody knows VIM. You should too. Even if it’s a pain in the ass. Even if you don’t want to. It’s installed pretty much everywhere with a terminal. So know the basics. Once again, my config is in my Dotfiles dotfiles highlights

Other Misc Stuff

Contexts

Contexts is a great utility for OS X. It enables me to fast-window-switch using a hotkey and a number. I keep my editor windows at certain numbers, my terminal windows at certain numbers, etc, and I can easily and quickly go right to the window I want with my keyboard. It’s not without a few annoyances, mainly around getting it to remember which windows go at which indexes if you have to restart it (or close a window), but the latest beta is beginning to address some of those.

Silver Searcher

Silver Searcher is a command line utility that represents a much improved version of a basic recursive grep. You can easily install it with Homebrew.

Dotfiles

As referenced before, my Dotfiles are all on Github. I forked an existing project for this, but there are a few different bases out there if you want to do something similar. This enables me to spin up my standard configurations on a new machine very easily. I just clone the repo into ~/.dotfiles, run the bootstrap script, and it will symlink everything to the cloned repo. git pull will get me my updates from any other systems. I use a couple different branches to represent different configurations.