Member-only story
How to Sync your dotfiles across different machines. Mac to Windows to Linux
I recently went back to using VIM and took the time to do a deep dive on my dotfiles. I had configured the perfect Neovim setup on my work MacBook, but when I switched to my desktop Windows machine, I found that my new shortcuts, theme, and plugins were missing!
In order to Sync these configurations manually, requires locating all necessary files (e.g., ~/.zshrc, ~/.config/nvim), copying them to a new folder, uploading them to GitHub, pulling them onto the other machine, and pasting them into the correct locations. This is where Chezmoi comes in handy!
Syncing with Chezmoi
chezmoi is an easy to use CLI for managing your dotfiles or any other configuration file you would like to sync across multiple devices. You can add your files or directories to chezmoi to manage and
install chezmoi (I prefer homebrew for mac/linux)
$ brew install chezmoiinitialize
$ chezmoi initadd the dotfiles you want to sync.
$ chezmoi add ~/.zshrc
$ chezmoi add ~/.oh-my-zsh
$ chezmoi add ~/.config/nvim
$ chezmoi add ~/.config/karabiner