From 7d4c541a0d4f09eb421425f8d49b65308d9e6cfd Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Tue, 13 Aug 2019 23:25:19 -0400 Subject: vim: use conf environment vars instead of paths --- templates/.vimrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/.vimrc b/templates/.vimrc index cd371a2..2cd28ab 100644 --- a/templates/.vimrc +++ b/templates/.vimrc @@ -112,10 +112,10 @@ au FileType crontab setlocal nowritebackup au FileType mail setlocal spell au FileType bindzone setlocal noexpandtab ts=8 sts=8 sw=8 -au BufWritePost ~/dotfiles/templates/* call ConfApply(expand('%:p')) +au BufWritePost $CONF_SOURCE/templates/* call ConfApply(expand('%:p')) function! ConfApply(name) - let l:rel = substitute(a:name, "^".expand("~/dotfiles/templates/"), "", "") + let l:rel = substitute(a:name, "^".expand($CONF_SOURCE."/templates/"), "", "") silent execute "!conf apply " . l:rel endfunction -- cgit v1.2.3