Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Shougo
    @Shougo
    Please read the documentation.
    Shougo
    @Shougo
    I have added on_event feature.
    call dein#add( 'blueyed/vim-diminactive', {
    \   'on_event':  'WinEnter', 'on_if': 'winnr("$") > 1'
    \ })
    Wang Shidong
    @wsdjeg
    thanks Shougo
    Shougo
    @Shougo
    on_i and on_idle is deprecated.
    mac10688
    @mac10688
    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
    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
    I don't know how I'm supposed to use it now
    I suppose call dein#add({githubname})?
    mac10688
    @mac10688
    I think I found the real readme in the doc folder
    Gontran Baerts
    @gbcreation

    I have added on_event feature.

    Thank you Shougo. I'm gonna test it.

    Gontran Baerts
    @gbcreation

    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
    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
    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
    @Shougo on_i is deprecated.but when it will be delete?
    I now just using on_i feature
    Wang Shidong
    @wsdjeg
    anyone like this feature?
    type any item to open the github repo page of the plugin
    Alexander Jeurissen
    @alexanderjeurissen
    Somehow the following hook doesn't work when using loadstate
      call dein#add('chriskempson/base16-vim', {
            \ 'hook_source': "
            \   colorscheme base16-solarized\n
            \   set background=dark\n
            \"})
    I expect that the colorscheme is applied, but sometimes when i run neovim the default colorscheme is applied.
    If I clear the cache of dein manually using call dein#clear_state() then the next time neovim is run the hook above works as expected, however when I exit that neovim instance and rerun neovim (then I presume dein loads the state because it was previously saved) the hook above isn't executed.
    Alexander Jeurissen
    @alexanderjeurissen
    I just replaced hook_source with hook_add and that seems to solve the problem, but I'm not sure why.. Is it because hook_source is cached and not evaluated in load_state ?
    Shougo
    @Shougo
    @Shougo on_i is deprecated.but when it will be delete?
    Not in the plan. The feature is converted to on_event.
    I just replaced hook_source with hook_add and that seems to solve the problem, but I'm not sure why.. Is it because hook_source is cached and not evaluated in load_state ?
            Note: non lazy plugins' |dein-options-hook_source| cannot be
            called.  You must call it by |dein#call_hook()| if needed.
    Alexander Jeurissen
    @alexanderjeurissen
    Hmm so my previous understanding was that hook_source got called when a plugin is sourced, and hook_add when a dein#add statement is called as in when the plugin is added to the runtime.
    how come non lazy plugins their hook_source is not called, is it because it's impossible for denite to determine when they are sourced ?
    Shougo
    @Shougo
    You can call it manually after dein#end().
    Alexander Jeurissen
    @alexanderjeurissen
    but then what is the benefit of hook_source compared to hook_add ?
    Shougo
    @Shougo
    call dein#call_hook('source')
    Alexander Jeurissen
    @alexanderjeurissen
    should I only use hook_source for actions that require the plugin to be fully loaded and use hook_add for all other cases ?
    or are there other benefits of the hook_source ?
    Shougo
    @Shougo
    You should use hook_source for it.
    hook_add is executed when it is added.
    Alexander Jeurissen
    @alexanderjeurissen
    ok that's what I assumed was the case, so then when should I use hook_add ? in what circumstances ?
    Shougo
    @Shougo
    It is for the mapping configurations for lazy loaded plugins.
    Alexander Jeurissen
    @alexanderjeurissen
    but wouldn't the configuration options of lazy loaded plugins benefit more from being loaded when the plugin is sourced ? i.e. hook_source ?
    Shougo
    @Shougo
    hook_add is the configuration to load it.
    My example: