Monochrome Color Themes for Xcode and Sublime Text

A lot of programmers like brightly colored syntax-highlighting themes for their source code editors. I do not. I find colorful high-contrast themes to be fatiguing, distracting, and annoying, so I've gravitated toward low-contrast themes like Zenburn and Havenjark. But even those feel too "busy" for me.

I've been on a retrocomputing kick lately, and I've missed the clean look of source code on the monochrome monitors I used in the good old days. So I've created some monochrome Xcode themes. If you like them, you can download them from here:

and copy them to your ~/Library/Developer/Xcode/UserData/FontAndColorThemes directory, and then select them from the Xcode → Preferences → Fonts & Colors window.

These themes are also available as Sublime Text color schemes:

These were my simple rules for creating the themes:

  • All colors have the same hue. They differ only in saturation and brightness.
  • Comments are dim.
  • Keywords are dim, but not as dim as comments.
  • Numeric and string constants are bright, almost white.
  • Other textual elements all have the same color.

I use Source Code Pro Light as my font, as I like the way the thin lines give a vector-graphics look.


Amber theme screenshot


Green theme screenshot


Blue theme screenshot


Blueprint theme screenshot


daVinci theme screenshot

Setting Up ArcGIS Runtime SDK for iOS for Xcode Bot

I am working on an iPad app that uses the ArcGIS Runtime SDK for iOS. Esri provides an easy-to-use installer and instructions for setting up the SDK so that it can be used with Xcode.

The installer puts the SDK files in the user’s home directory, and the setup guide recommends using paths like $(HOME)/Library/SDKs/ArcGIS/iOS/ in Xcode projects to find the framework’s headers and libraries. This works fine as long as one is using Xcode as a user who has installed the SDK. However, it causes problems if one wants to set up an Xcode bot to automatically build and test the app. The Xcode service that runs bots executes under the _teamsserver user account, and by default that user’s home directory does not exist, and you can’t log in as that user to run the SDK installer. So attempts to create a bot to build the app just result in “ArcGIS.h not found” compilation errors.

After I bit of Googling and experimentation, I came up with a solution:

  1. Install the SDK in my user account (or another normal account), following Esri’s installer and instructions.
  2. Make my ~/Library directory world-readable:
    chmod 755 ~/Library
  3. Create the /var/teamsserver home directory for the _teamsserver user:
    sudo mkdir /var/teamsserver
  4. Create the /var/teamsserver/Library directory for the _teamsserver user:
    sudo mkdir /var/teamsserver/Library
  5. Set _teamsserver as the owner of the directories:
    sudo chown -R _teamsserver:_teamsserver /var/teamsserver/
  6. Set permissions on the directories:
    sudo chmod -R 770 /var/teamsserver/
  7. Create a symbolic link to the SDK installation:
    sudo ln -s ~/Library/SDKs /var/teamsserver/Library/SDKs

This works. It could be argued that it would be better to set up the symbolic links in some shared location (/Library, /usr/local, etc.) and then use a full path in the Xcode project to find them, but I prefer this solution because it doesn’t require any extra steps for developers who don’t need to set up a bot.

Havenjark Color Theme for Xcode 4

I've been experimenting with low-contrast color themes in my source-code editors. For a while, I thought I had settled on Zenburn. However, I recently ran across Havenjark in the Eclipse Color Themes plugin, and I decided it is perfection.

The only problem was that, while I could find Havenjark theme files for Eclipse and Textmate/Sublime Text 2, I could not find one for Xcode. So I converted the Eclipse color theme to Xcode 4's color theme format by hand.

If you'd like to try Havenjark in Xcode 4 yourself, download Havenjark.dvtcolortheme and copy it to your ~/Library/Developer/Xcode/UserData/FontAndColorThemes/ directory. Then, in Xcode, go to Preferences -> Fonts & Colors and select it.

My theme uses the Bitstream Vera Sans Mono font, which you can download for free from various locations on the Internet, or you can just change the font to something of your liking.

I'm not going to bother converting this to Visual Studio's color-theme format. There is no point in trying to make Windows development look nice.

Syndicate content