aspiers/stow

Forcing a directory to be split open

Open

#29 建立於 2018年10月4日

在 GitHub 查看
 (12 留言) (2 反應) (0 負責人)Perl (1,013 star) (51 fork)batch import
documentationenhancementfaqhelp wanted

描述

(Initially posted on the help-stow mailing list.)

Like many others, I use stow to manage my dotfiles across multiple machines. In particular, a small exerpt of my stow tree includes

~/dotfiles/vim/plugin ~/dotfiles/vim/syntax ...

so I can just cd ~/dotfiles && stow -S vim after git-cloning dotfiles to a new machine.

But that'll just do a symlink ~/.vim -> ~/dotfiles/.vim, which is not what I want: this will cause e.g. ~/.vim/undo to end up in ~/dotfiles as well. So I always want to split open ~/.vim. In this specific case I could alternatively get away with gitignoring all other directories in ~/.vim, but this is less optimal for dotfiles which reside e.g. in ~/.config, as I really don't want ~/.config to be a symlink but rather ~/.config/foo to be one. So I need to first create ~/.vim myself and manually add a directory into it (e.g. ~/.vim/undo) before stowing my dotfiles, to force splitting that directory. It would be nice it it was possible to create e.g. ~/dotfiles/vim/.stow-force-split (name is up to bikeshedding) to say, "you are not allowed to symlink this directory directly, but must split it" (and that file shouldn't get symlinked itself).

Looking forward to your thoughts.

貢獻者指南