Sadece :source
işleri:
% export MYPATH='a/b/c'
% mkdir -p $MYPATH
% export MYFILE='temp.vim'
% cat > $MYPATH/$MYFILE
echo 'hello world'
^D
% vim
:source $MYPATH/$MYFILE
hello world
Eğer Örneğin: Aşağıdaki BAR_script
adlı bir değişken bulmaya çalışacağını söyledi ederken
exec "source " . $BAR . "_script.vim"
, BAR
değişken eklemek istiyorum Yine de bazı vim betikleri otomatik olarak kaynaklanmak istiyorsa, sadece ~/.vim/plugin/
dizininize yapıştırın ve bunlar yüklenecek sizin için, el ile yapmak zorunda kalmadan.
Ben vim en herşeyden daha kullanışlı yardım inşa bulmak eğilimindedir
*:set_env* *expand-env* *expand-environment-var*
Environment variables in specific string options will be expanded. If the
environment variable exists the '$' and the following environment variable
name is replaced with its value. If it does not exist the '$' and the name
are not modified. Any non-id character (not a letter, digit or '_') may
follow the environment variable name. That character and what follows is
appended to the value of the environment variable. Examples: >
:set term=$TERM.new
:set path=/usr/$INCLUDE,$HOME/include,.
When adding or removing a string from an option with ":set opt-=val" or ":set
opt+=val" the expansion is done before the adding or removing.
(Ben ilk olasılıkla sonuca tamamlayarak :help environment
ve sekme yaparak var) :help expand-environment-var
itibaren
ama bir süre sürer neyi arayacağınızı bilmenin hilesi olsun.
Çok hoş, teşekkürler! –