Syncing dot files with dropbox

2.2k views Asked by At

I puts all my dotfiles in $HOME/Dropbox/dotfiles

and make a hard link(I think it's the way to go, and for instance vim does't load soft link rc file)

ln $HOME/Dropbox/dotfiles/.vimrc $HOME/.vimrc

The problem is as long as I make change to the file in the dropbox directories, everything works as expected. But when I change the hard link file(which is $HOME/.vimrc), the original file changes accordingly, but dropbox won't sync!!(same as iCloud mobile document folder)

Any idea?

1

There are 1 answers

3
cronburg On BEST ANSWER

Use soft links. Hard links make it so that Dropbox can't tell when the file is updated. This is because Dropbox doesn't poll the contents of every single file you have, it just looks at modification dates on the files located in your Dropbox.

This is exactly what I use for syncing my dot files with Dropbox:

$ ln -s ~/Dropbox/dotfiles/.vimrc .vimrc

and vim still loads the soft-linked vimrc file.