this post was submitted on 07 Jul 2023
3 points (100.0% liked)

VIM - Vi IMproved

1039 readers
1 users here now

For Vim enthusiasts and anyone interested in Vim/Neovim!

"VIM is the greatest editor since the stone chisel." - Dr. Jose Unpingco

#HJKL

founded 1 year ago
MODERATORS
 

Does anyone have experience using GNU Stow for managing dot files? I'm especially interested in using it to build a git repo to include my .vimrc file so I can sync it between hosts.

I know I've seen other methods, such as making your home directory a bare git repo, so you can check-in your config files without moving them. There is also the chezmoi golang project.

How do others sync .vimrc between hosts?

top 2 comments
sorted by: hot top controversial new old
[โ€“] igemnace@lemmy.sdf.org 0 points 1 year ago (1 children)

I agree with @glad_cat@lemmy.sdf.org, all of these are just different ways to skin the cat. Whatever gets the files in the proper directories. Once you pick one (even arbitrarily, to a degree), you'll very likely find no reason to push you toward another solution. I myself use symlinks with GNU cp -s

I've never heard of cp -faTs before. I did some experimenting and was surprised that it was recursive. I thought you needed an -R for that, but you don't. So, cp -faRTs appears to do the same thing, but is funnier.

In any case, thanks for sharing your repo. I take it, that after the initial install, you can just repeatedly git pull https://git.sr.ht/~igemnace/vim-config and then run vim-config/scripts/install-cfg to keep your config files up-to-date.