From d26082c031399d2a30c2f9847a741d72f8b89b96 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Thu, 10 Sep 2009 22:55:17 -0400 Subject: [PATCH] only set vim plugin global variables if they haven't yet been set, so they can be configured from vimrc --- misc/vim/plugin/factor.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/vim/plugin/factor.vim b/misc/vim/plugin/factor.vim index 9f6f0d3c75..cbe316a0e6 100644 --- a/misc/vim/plugin/factor.vim +++ b/misc/vim/plugin/factor.vim @@ -2,8 +2,13 @@ nmap fi :FactorVocabImpl nmap fd :FactorVocabDocs nmap ft :FactorVocabTests -let g:FactorRoot = "~/factor" -let g:FactorVocabRoots = ["core", "basis", "extra", "work"] +if !exists("g:FactorRoot") + let g:FactorRoot = "~/factor" +endif + +if !exists("g:FactorVocabRoots") + let g:FactorVocabRoots = ["core", "basis", "extra", "work"] +endif command! -nargs=1 -complete=custom,FactorCompleteVocab FactorVocab :call GoToFactorVocab("") command! FactorVocabImpl :call GoToFactorVocabImpl()