ruppel.io / 16 Color Themes for Terminal.app and vim


16 Color Themes for Terminal.app and vim

Last edited February 24, 2024

16 colors should be enough for anybody.

Like any easily-distracted engineer, I used to spend countless hours customizing my terminal and editor. For many years, those were iTerm2 and TextMate 2, because they had the best themes! Unfortunately, every time I set up a new machine, I had to set these themes up again 😞

Setting up a new machine is a pain point in general. Ideally, there would be as little friction as possible to start doing things I want to be doing, like coding. Eventually, I decided this means I'd like not install things, or put another way, I'd like to use the tools that come with the machine. Since I'm team macOS, I get Terminal.app and vim out of the box. That's what ultimately made me switch.

Theming was a bit lackluster though. At the time I was big into low-contrast, dim themes like Solarized and Nord, and none of vim's included themes looked all that great to me. Then I found Jeff Kreeftmeijer's post on 16-color themes explaining how to use 16-color themes to achieve consistent theming between terminal and vim. It's a must-read.

The gist is that there are 16 basic ANSI colors. Terminal.app can redefine those colors, and vim has themes that rely on only those colors. Put these two together and you can theme vim just by theming Terminal.app.

Terminal.app

#

This endeavor starts and ends with theming your terminal. After you're all set up, you'll enjoy how easy it is to switch your terminal theme to something to match your mood and vim will just follow suit. But first, find yourself a good Terminal.app theme. Here are some good resources:

vim

#

Next up is to configure vim to use a 16-color theme. vim has one of these included: default 😩. That might work for you! I prefer Jeff Kreeftmeijer's dim theme (grim can also be found in this repo). Another good 16-color theme is noctu by Noah Frederick.

other tools

#