I have hundreds of files and folders in my dotfiles repo, and nearly 1000 commits—there are quite a few hidden gems buried in there that generally don’t get to see the light of day. Rather than wander aimlessly through them, let me give you the guided tour.
I often tell people “oh, and you can also go check out my dotfiles repository for more cool configurations” when I’m giving out dotfiles advice. If someone gave me this advice, I know I wouldn’t follow up, even if I had the utmost awe for the recommender. Drudging through config files isn’t all that fun, even though they can do fun things. Why not get rid of the drudgery?
This post is designed to bring the coolest parts of my dotfiles to the top. It’s organized by topic, so feel free to skip around.
Note: throughout this post, I’ll be linking to my dotfiles at a specific
commit on GitHub. While this solves the problem of line-level links breaking on
updates, it means that you’ll almost certainly be looking at out-dated code.
Make sure to check out the corresponding file on the
master branch for the
most up-to-date version.
Also, I just wrote about one of my biggest dotfile hacks: using rcm to keep my dotfiles in sync across machines. Be sure to give it a read if you’re running into that problem.
I have a lot of cool stuff going on in my
- I bind the prefix key to
C-f, something which I haven’t seen many people do. I’ve never had a problem with it conflicting with commonly used shortcuts, and it’s incredibly easy to press (compared with the common options of
- I integrate with two Vim plugins:
I use the GNU
dircolors command to change the colors output by the
program. After running
brew install coreutils on OS X, I’m able to see the
colors thanks to this file and this snippet in my zshrc.
(image from the dircolors-solarized repository on GitHub)
For my friends at CMU, I have
aklog cs.cmu.edu in my ~/.zshenv,
which gets run even when you log in interactively (like what happens when you
scp something), so that I can copy files from my local machine to the SCS AFS
space, which is useful for doing things like making handins. Note that the file
linked to above is a host-specific file that only “exists” for me on Andrew
machines. You can read more about my setup in my
I use a zsh plugin to syntax highlight my commands as I type them
on the command line, similar to how the fish shell does it. It does various
things, like coloring the command red or green based on whether it exists,
underlines filenames that exist, highlights filenames that might be misspelled
in yellow, highlights built-ins like
for in orange, etc.
Here are some examples from my setup:
Automatic Dotfile Updates
I wrote a pretty robust script that reminds me to update my dotfiles and my
system regularly. All it does is remind me to check for system updates once
every 24 hours, but it works so well that I had updated my system
before I even read about Shell Shock!
I’d like to think that my whole
aliases.sh file is golden, but if
you’re looking for some specific things I like about it, check out my
aliases, which I wrote about here, and my
chromemem alias, which I wrote about here.
I wrote about how I use Python Virtualenvs to sandbox Ruby gems, a post in which I dropped some snippets that you can use to configure virtualenvwrapper to work with Ruby projects. I actually went ahead and fed those files right into rcm, so they’ll always be available if I ever get a new laptop.
My hostname on every machine I ssh to for school is
jezimmer, but there are
countless servers I can ssh into (7 for
unix.andrew.cmu.edu, 99+ for
ghc*.ghc.andrew.cmu.edu, 10 for 15-213, the list goes on). These
lines enable me to ssh to any of those machines with just a
hostname, and the username is assumed to be
There’s not much to show for this one, but in Preferences > General of iTerm2,
you can opt to load your iTerm2 preferences from a specific location. I’ve set
/Users/jake/.dotfiles, which means that my iTerm2 settings are always
written to my
.dotfiles/ directory. If I ever make changes to iTerm2, they get
propagated as changes that Git picks up on and which I subsequently check into
I’m in love with my Vim setup. If you’re looking for help getting started
configuring Vim, you should checkout the Vim plugins workshop I put
together, which gets you started with a “fully-configured” Vim
setup. Once you think you’ve “mastered” that and you’re ready for more, here are
a list of things I’m proud of in my
set breakindentA feature new in Vim 7.4, this allows you to align wrapped text at the same indentation level as the preceding text.
- these mappings, which let me move around (move up and down in particular) in long lines just as if they were short.
- this mapping, which lets me open Vim help pages in new tabs
I’ve only highlighted a fraction of my configuration files, but I think I’ve managed to capture a good portion of them. If you thought that one of these snippets was useful, are having trouble getting something to work, or have something interesting to share, leave a comment below!