Analysis of swkp/dotfiles Repo

Posted on January 20, 2015 by Richard Goulter
Tags: , ,

I did not notice that this repo had about 3,000 stars. That is A LOT.

Anyway, I came across dotbot by looking at GitHub’s page.
DotBot, in a sentence, enhances a dotfiles repo by taking care of the “symlinking stuff”. Whether or not this is an accurate summary of DotBot is beside the point, so much as this is the problem you know of which it will solve.
– More importantly, I’d say, isn’t so much that it automatically sets-up the linking so-much-as that it serves as a convenient way to document what files go where. That is, dotfiles usually fall into the “write once and forget” category of programs. It would be nice to do better than that.

I came across skwp/dotfiles by way of the author’s “Cleanest vimrc You’ve Ever Seen” post. Excerpt:

After I [split my .vimrc up], I ended up with a vimrc that’s only about 90 lines long including very detailed comments about every section.

I think this is the cleanest vimrc you’ll see on the web. All my vim plugin settings are broken down into individual files, following a convention of one file per vim plugin that I use, plus some extra ones that are too small to be plugins.

I think the author here is being a bit daft to say his .vimrc is less than 100 lines of code; the .vimrc he split up was presumably longer, and the monolithic .vimrc (which the posts suggests is a problem) is being used to do what could be more modularised.
– Rather, a truly minimalistic .vimrc would be relying on convention-over-configuration. (Which isn’t necessarily a good idea with Vim, but whatever). – This is all beside the point; the goal is “more readable”.

At any rate, skwp/dotfiles makes for a good “case study” of how to make a clean dotfiles repo. Here are some notes:

Ammendment: (27/01): While I’ve not yet tried splitting up my .vimrc yet, I did spare half a thought in trying to split up my fish config, & tmux config.
I think ideally, I could specify in a .local (or .user file) installation-specific locations, e.g. some $POWERLINE_PATH, etc. and then the “global” config could pick up on this.
– Unfortunately, I don’t know tmux scripting well enough to know for certain, but my impression was it wasn’t easy to do that; at least not how I expected.

I quickly ran into “configuration vs convention”; e.g., what is worth putting in a “global” config, if it needs to depend on a variable set in a per-user config?
Or setting $EDITOR to nvim, but this may not work on OSX? (Override it in OSX.user.config? Explicitly test for presence of nvim in /usr/bin?).
Rather, I wondered how much really belonged in the global config; and if “not much”, then what convenience is there in having some dotfiles manager like DotBot?

Newer post Older post