I use a lot of tools at work and at home, and im constantly tweaking them in one location or the other. It's somewhat common practice for people to use Git to version their .vim, .vimrc, and other . files, since you can host your config files on github and have the share-ability and all the other advantages that implies. Being able to version and branch my configs sounds like a grand idea, since I'm always messing about with them.

I'd like to discuss the best practice for doing this on a slightly wider scope. How would you implement it?

  • Have your configfiles repo in ~/Library/Configs or similar, and symlink the appropriate files?
  • How to handle preference files for Applications, ie iTerm2.
    • These files are recreated every time, so you'd have to symlink 'backwards' and put a link in the repo? rather than symlinking to the repo, since it would just delete the symlink.

I classify my personal settings into several types:

  • Styles, like .vimrc, Compiz configuration, Eclipse editor settings, etc.
  • Complex configurations that are hard to customize each time by hand
  • Frequent change settings

For each type, I have different solution.

  • For styles, create my own Debian packages, e.g., vim-pref-lenik, eclipse-pref-lenik. These packages just drop files in etc/, /usr/share/gconf, or somewhere.

  • For complex configurations, such as LDAP, Apache2, etc., firstly, try to implement some extension points with helper utilities, create the xxx-myapi Debian packages, and then create another Debian package for my own configuration.

  • For those frequent change settings, using Git stuff to synchronize between work locations.

Though, I'm using Debian, but the same approach may satisfy for OSX, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.