Configurations are composed with groups. A group represents a collection of files that share some properties. A
local group is added to the configuration file by adding a
Assuming your configuration files for
Neovim reside in
~/dt/nvim, and all match the globbing pattern
*init.vim, a minimal working example can then be configured as:
[[local]] name = "Neovim" basedir = "~/dt/nvim" sources = ["*init.vim"] target = "~/.config/nvim"
This content causes
dt-cli to perform the following steps:
- Create a "staging" directory at
XDG_DATA_HOMEenvironment variable is set, otherwise at
- Create the group's staging directory under the staging directory:
- Find all items (recursively if an item is a directory) that matches glob
~/dt/nvim/*init.vimand store them back in the
- For each item in the updated
sourcesarray, first copy it to the group's staging directory (
~/.local/share/dt/staging/Neovim), then symlink it to the target directory (
~/.config/nvim), abort if a target file already exists.
Details of above steps are explained in the Syncing Methods section.
Aborting on existing target files is probably not what you want. Read on for a better solution!