Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Many programs (like git) respect the environment variable $XDG_CONFIG_HOME, which allows you to set the location of your 'dotfiles' to a different directory session-wide. This means you don't need to make your entire home directory a single git repo.

My dotfiles repo (https://github.com/fredsmith/dotfiles/) uses this to maintain a clean, readable configuration directory that doesn't mess up my homedir with a bunch of symlinks, and the only installation I have to do is: "ln -s ~/dotfiles/bashrc .bashrc"



What do you do to deal with programs (like vim) that don't respect XDG?


For my "traveling" config, I have this in my .zshrc, it'll work in .bashrc too:

  export VIMRUNTIME=$HOME/.local/vim/
  alias vim="vim -u $HOME/.local/vim/vimrc"


Awesome information, can't believe I've never heard of this. Goodbye ln -s x 10




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: