These are chat archives for Shougo/dein.vim

22nd
Apr 2016
Shougo
@Shougo
Apr 22 2016 00:14
I have added on_event feature.
call dein#add( 'blueyed/vim-diminactive', {
\   'on_event':  'WinEnter', 'on_if': 'winnr("$") > 1'
\ })
Wang Shidong
@wsdjeg
Apr 22 2016 00:27
thanks Shougo
Shougo
@Shougo
Apr 22 2016 00:34
on_i and on_idle is deprecated.
mac10688
@mac10688
Apr 22 2016 01:29
hi, I am having issues setting up Shougo
i think I followed directions but I see these errors...
mac10688@mac10688-Gazelle:~/.config/nvim$ nvim init.vim
Error detected while processing /home/mac10688/.config/nvim/init.vim:
line 6:
E117: Unknown function: dein#begin
line 8:
E117: Unknown function: dein#add
line 9:
E117: Unknown function: dein#add
line 12:
E117: Unknown function: dein#end
line 14:
E475: Invalid argument: on<Paste>
i installed Shougo in /opt/dein
mac10688
@mac10688
Apr 22 2016 01:38
actually I think I fixed most of those errors
just one more left
Error detected while processing /home/mac10688/.config/nvim/init.vim:
line 14:
E475: Invalid argument: on<Paste>
woops!!
i don't know where that <Paste> came from
I think it's working now
mac10688
@mac10688
Apr 22 2016 01:50
I don't know how I'm supposed to use it now
I suppose call dein#add({githubname})?
mac10688
@mac10688
Apr 22 2016 02:15
I think I found the real readme in the doc folder
Gontran Baerts
@gbcreation
Apr 22 2016 06:39

I have added on_event feature.

Thank you Shougo. I'm gonna test it.

Gontran Baerts
@gbcreation
Apr 22 2016 08:57

on_eventseems to work very well. Good work Shougo :+1:
For vim-diminactive, I'm using the example given in the help file. It works well for :split.
For vim-projectionist, I'm using this:

call dein#add('RomainEndelin/vim-projectionist', {
\    'on_event': ['VimEnter', 'BufRead'],
\    'on_if': 'findfile(".projections.json", ";") != "" || findfile(".projections.json", ".;") != ""'
\ })

I think on_eventdoes not need to handle {list} type, as this seems to work too:

call dein#add('RomainEndelin/vim-projectionist', {
\    'on_event': 'VimEnter,BufRead',
\    'on_if': 'findfile(".projections.json", ";") != "" || findfile(".projections.json", ".;") != ""'
\ })
Gontran Baerts
@gbcreation
Apr 22 2016 09:24
Is it possible to know which event is emitted ?
I would like to use something like:
'on_if': 'findfile(".projections.json", event == 'VimEnter' ? ";" : ".;") != ""'
Gontran Baerts
@gbcreation
Apr 22 2016 09:53
I answer me, this seems to work:
call dein#add('RomainEndelin/vim-projectionist', {
\    'on_event': ['VimEnter', 'BufRead'],
\    'on_if': 'findfile(".projections.json", a:event == "VimEnter" ? ";" : ".;") != ""'
\ })
Wang Shidong
@wsdjeg
Apr 22 2016 13:18
@Shougo on_i is deprecated.but when it will be delete?
I now just using on_i feature