I have been setting up my development environment for years. Every time I buy a new machine (or perform a clean install of a new operating system) I go through the same setup. The issue is that my setup has yet to be documented and I spend a few weeks remembering things I have not installed or setup. This guide is meant to act as an evolving environment setup guide. This also will shed light on my setup and may give you ideas on what you can do to refine your setup.
I have thought about automating this, but I do not really see a need for automation at this time. This is a personal process that I usually take joy in performing.
Note: This article was triggered by the arrival of my new MacBook Air.
Boot the machine and setup your account. Log into iCloud and setup Find my Mac and iCloud Keychain. Update any and all system software. Clean up your dock and set any color preferences you may have. Mine is pretty basic:
New Finder windows showto your user’s home folder.
- Set view options to arrange by Name and click
Use as Defaults.
- On the desktop, set view options to arrange by kind.
Install Apple Software / Software from the Mac App Store
This is a no-brainer. I spend the overwhelming majority of my development time working on iOS projects or piddling with Mac projects. A few things to remember when setting up Xcode:
- Login to your Apple developer account under
- Enable line numbers for your editor by ticking the
Line numbersoption under
- Setup CodeSnippet sync through Dropbox (after installation) by running the following command (assumes Xcode CodeSnippet directory lives in Dropbox):
I also like to setup a few keyboard shortcuts for Xcode (and the iOS Simulator) in
System Preferences >
Xcode (Note: Add Xcode if it does not exist):
- Menu Title:
iOS Simulator (Note: Add iOS Simulator if it does not exist):
- Menu Title:
Reset Content and Settings…
Install Other Software / Tool Setup
In addition to using Dropbox for easy cloud storage, I also use it to sync most of my settings / preferences between machines. It’s usually one of the first things I install as it holds the “key” for me (see the next section).
- Ensure 1Password is pointing to the vault being synced by Dropbox.
- Enable Watchtower.
- Install Safari extension.
I was a big Quicksilver fan, but moved to this about 6 - 8 months ago. It’s been a smooth transition and it definitely seems more updated than Quicksilver. I sync my workflows in Dropbox so that all my machines have the same workflows. Buy the Powerpack, you won’t regret it. The workflows I cannot live without:
- Install command line tools.
- Under the Appearance preferences, uncheck
Page guide at X characters.
- Under the Editor Defaults preferences, check
Soft wrap text to:and select
- Download Gruber Dark color scheme and save it to
~/Library/Application\ Support/BBEdit/Color\ Schemes/; Change the color scheme under the Text Colors preferences.
- BBEdit now supports syncing the items within Application Support over Dropbox! Just quit BBEdit and copy the
~/Dropbox/Application\ Support. It should automatically pick up the copy in your Dropbox folder the next time you launch BBEdit.
- Setup BBEdit as the default
I don’t rely heavily on TextExpander, but there are a few snippets that I cannot live without. I even include some Xcode snippets in here because I don’t find the Xcode Snippets feature reliable for certain snippets (such as pragma blocks). I also set this to sync via Dropbox so that my snippets are on each my computers.
- Install Solarized Dark theme for Terminal.
- Enable Option as Meta Key (Under Preferences > Profiles > Keyboard and tick “Use Option as Meta key) for bash commands
Install the latest version of Vim (the one shipping with Yosemite is outdated and it’s nice to keep up-to-date):
Now you can enable a better backspace function, syntax highlighting, and Git commit spellcheck and body wrapping by adding the following to your
~/.vimrc (create one if this file does not exist):
1 2 3 set backspace=2 syntax on autocmd Filetype gitcommit setlocal spell textwidth=72
Git / Bitbucket / Github
- Generate an SSH Key; Default save location/name, no password.
- Add public SSH Key to Bitbucket and Github.
- Set Git Username:
- Set Git Email:
- Set BBEdit as default git difftool by adding the following to your
.gitconfig(Note: Must have BBEdit command line tools installed):
1 2 3 4 5 6 [diff] tool = "bbdiff" [difftool] prompt = false [difftool "bbdiff"] cmd = bbdiff --wait --resume --ignore-spaces "$LOCAL" "$REMOTE"
- Setup git autocomplete script (downloaded to Dropbox from
https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash) by adding the following to your
1 2 3 if [ -f ~/Dropbox/.git-completion.bash ]; then . ~/Dropbox/.git-completion.bash fi
- Setup git aware prompt for displaying your active git branch in the Terminal prompt
Update Ruby; Install RBEnv
- Run the following command in Terminal:
brew install rbenv ruby-build
eval "$(rbenv init -)"to your
- List the currently available Ruby versions:
rbenv install -l
- Install the version of Ruby you want:
rbenv install VERSION
xctool is a great cli for building Xcode projects developed by Facebook. Where the rubber meets the road for this tool is its ability to run a project’s test target. You can run all of a project’s tests, a single test class, or even specific test cases. It even spits out nicely formatted results and for you CI enthusiasts out there, it even supports outputting the results in a JUnit format so you can publish test results. You can install xctool through Homebrew.
I use my personal Macs for work and personal projects. This means I use Git for work and personal projects. For my work commits, I like for my work email to be tied to the commit. Likewise for my personal commits. I really dislike having to configure my Git options when cloning or starting a new project. Enter karn. karn is a great little Go utility that helps manage Git user configuration for me. With a little setup, I now can freely commit without having to worry about which email is associated with which project.
Install Go through Homebrew:
Setup GOPATH variables in your
export GOPATH=$HOME/Developer/go export GOROOT=/usr/local/opt/go/libexec export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
When I switched to using Git in Terminal about a year ago, I became fairly efficient at quickly typing file paths with help of the tab autocomplete shortcut. However, this is quite cumbersome and not very fast. You can also highlight file paths with your mouse and copy and paste them like an animal, but this goes against my desire to keep my hands off of my mouse. Enter PatchPicker. PathPicker allows you to pipe commands through the utility so that you can arrow and select files.
Then to select files to stage for a commit:
To keep it more shorthand and faster to type, you can use a Git alias for the status command:
Now we can bring up files to stage for a commit with this:
There are other pieces of software that I install, but these are the most important and the ones that I cannot function without.