These are chat archives for Shougo/dein.vim

20th
Apr 2016
Gontran Baerts
@gbcreation
Apr 20 2016 08:38

We can't use VimL variables in TOML files, can we ?
I mean, can we do that:

let s:currentScriptDir=fnamemodify(expand('<sfile>'), ':h')
call dein#add('vim-airline/vim-airline', {
\    'hook_add': 'source '.s:currentScriptDir.'/plugins/vim-airline.vim'
\ })

with TOML file:

[[plugins]]
repo = 'vim-airline/vim-airline'
hook_add = 'source '.s:currentScriptDir.'/plugins/vim-airline.vim'

?

Wang Shidong
@wsdjeg
Apr 20 2016 12:39
@gbcreation have you read Shougo's dotfiles?
also you can have a look at mine
Gontran Baerts
@gbcreation
Apr 20 2016 13:37
yes I did. You are not using TOML files, are you? Shougo does, but I have not seen usage of external Vim variables in his TOML files. I guess it is not possible. Do you think it could be interesting to have this feature?
Wang Shidong
@wsdjeg
Apr 20 2016 13:43
sorry I do not use toml,I use *.vim file,I do not see any advantage of toml
Shougo
@Shougo
Apr 20 2016 20:09
@gbcreation
hook_add = "execute 'source '.s:currentScriptDir.'/plugins/vim-airline.vim'"
is correct.
TOML cannot use s:currentScriptDir, so it should be global variable.
hook_add = "execute 'source '.g:currentScriptDir.'/plugins/vim-airline.vim'"
Gontran Baerts
@gbcreation
Apr 20 2016 20:18
@Shougo Thank you for the tip. I think it should be added to the help file of dein.
Gontran Baerts
@gbcreation
Apr 20 2016 21:00
Very nice the dein source for Unite :smile:
Shougo
@Shougo
Apr 20 2016 22:03
I have added on_if feature.