Closed roachsinai closed 1 year ago
What about defining the variables in the profile with something like this:
variables:
vim_home_one: "$HOME/vimfiles"
vim_home_two: "$HOME/.vim"
dotfiles:
f_vimrc:
src: mnt/c/Users/rs/_vimrc
dst: /mnt/c/Users/rs/_vimrc
chmod: '777'
profiles:
one:
dotfiles:
- f_vimrc
variables:
vim_home: "{{@@ vim_home_one @@}}"
two:
dotfiles:
- f_vimrc
variables:
vim_home: "{{@@ vim_home_two @@}}"
and the file content using that variable vim_home
set undodir={{@@ vim_home @@}}/undo
Note that this hasn't been tested but it gives you maybe a way to solve it.
Thanks for your reply. Sorry forgot about option -p
of dotdrop install.
I'm using Vim both in WSL and Windows 11. Already using dotdrop manage dotfiles of WSL, now I'm trying using dotdrop in WSL manage dotfiles like _vimrc which locate at /mnt/c/Users/rs/_vimrc (means _vimrc is a file at Windows part).
Thanks for
include
provided by dotdrop, I could just write single line in file dotfiles/mnt/c/Users/rs/_vimrc:{%@@ include 'vimrc' @@%}
Then content of Windows _vimrc will be same with WSL .vimrc.
But some times config of Windows part needed different with WSL part, for example:
Some config files default location of Windows part store at
vimfiles
rather than.vim
.So need find way to let dotdrop get
set undodir=$HOME/vimfiles/undo
fo _vimrc andset undodir=$HOME/.vim/undo
for .vimrc.Using templete variable like
{{@@ os @@}}
not works. As in wsl gotLinux
and dotfile _vimrc just include dotfile vimrc, content of _vimrc and .vimrc will be identical.So if support define
os
variable in config.yaml like below scoop only for f__vimrc, like belowcould help a lot.
Thanks in advance!