Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gontran Baerts
    @gbcreation
    Same thing about the last Note: it should be moved to the dein-options-hook_post_source section.
    Gontran Baerts
    @gbcreation
    Is it possible to lazy load plugins that define text objects ?
    Which kind of event can be used ?
    Gontran Baerts
    @gbcreation
    Don't mind, just found I can use on_map
    Shougo
    @Shougo
    @Shougo Just to know, do you plan to deprecate on_iand on_idleafter implementing on_event?
    No.
    Why do you recommend on_ifor DelimitMate ? For performance reasons ?
    It is the implementation reason.
    I misanderstood. In fact, it is not clear that the three last paragraghs of the HOOKS section concern all kinds of hooks. I thought they were included in the dein-options-hook_post_update section because they have the same indent
    I think the Note about non lazy plugins' dein-options-hook_source would be better placed in the dein-options-hook_source section
    Same thing about the last Note: it should be moved to the dein-options-hook_post_source section.
    Shougo
    @Shougo
    I will fix it.
    Gontran Baerts
    @gbcreation

    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
    @gbcreation have you read Shougo's dotfiles?
    also you can have a look at mine
    Gontran Baerts
    @gbcreation
    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
    sorry I do not use toml,I use *.vim file,I do not see any advantage of toml
    Shougo
    @Shougo
    @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
    @Shougo Thank you for the tip. I think it should be added to the help file of dein.
    Gontran Baerts
    @gbcreation
    Very nice the dein source for Unite :smile:
    Shougo
    @Shougo
    I have added on_if feature.
    Gontran Baerts
    @gbcreation
    Thank you. I'm going to test it.
    Gontran Baerts
    @gbcreation

    So, it works perfectly for this:

    call dein#add( 'blueyed/vim-diminactive', {
    \   'on_if': 'winnr("$") > 1'
    \ })

    The plugin is loaded as soon as I have two windows.

    It also works for this:

    call dein#add('mhinz/vim-signify', {
    \    'on_if': 'finddir(".hg", ".;") != ""'
    \ })

    The plugin is loaded when I open a file controlled by Mercurial

    But it does not work for this:

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

    when I only launch Nvim without a filename on the command line.

    I would like to just launch Nvim without opening a file, then execute :Econtroller loginto open the file containing the Login controller class, for example.
    Gontran Baerts
    @gbcreation
    Maybe the second argument of findfile()is not correct.
    Gontran Baerts
    @gbcreation
    Indeed, echo findfile(".projections.json", ".;") displays nothing, but echo findfile(".projections.json", ";")finds the file.

    However

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

    does not work anyway.

    on_ifis only associated to the BufReadevent ?

    My mistake, this:

    call dein#add( 'blueyed/vim-diminactive', {
    \   'on_if': 'winnr("$") > 1'
    \ })

    does not work if I open a single file and then do :sp.

    Wang Shidong
    @wsdjeg
    @gbcreation I think on if is slow,for this plugin you should use on_cmd
    call dein#add('RomainEndelin/vim-projectionist', {
    \ 'on_cmd': 'A',
    \ })
    you can use a list of commands of vim-projectionist,the plugin is loaded on the first time you run this command
    even if you has projections.json in root,but if you do not use this command,I think no need load this plugin
    Gontran Baerts
    @gbcreation
    @wsdjeg Hi! I don't think on_if is so slow. When I use it to lazy load vim-dimactive, it has no impact on my workflow.
    I could indeed use a list of commands to lazy load vim-projectionist, but depending on the project I work on, those commands could be different. For example, I could have :Econtroller for a project, and :Ecomponent for another one. I would not be useful to have to modify my lazy loading setup every time I work on a new project with new projections. Looking for the .projections.json file is a one time setup for all my projects.
    Wang Shidong
    @wsdjeg
    @gbcreation I know
    Shougo
    @Shougo
    on_ifis only associated to the BufReadevent ?
    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