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

    I tested your example as I use easymotion too. Here is my configuration

    call dein#add('easymotion/vim-easymotion', {
    \    'on_map': [['n', '<Plug>']],
    \    'hook_add': "
    \        nmap w <Plug>(easymotion-lineforward)\n
    \        nnoremap W     w\n
    \        nmap b <Plug>(easymotion-linebackward)\n
    \        nnoremap B     b\n
    \        nmap [Alt]j <Plug>(easymotion-j)\n
    \        nmap [Alt]k <Plug>(easymotion-k)\n
    \        nmap ' <Plug>(easymotion-prefix)\n
    \        let g:EasyMotion_startofline = 0\n
    \        let g:EasyMotion_show_prompt = 0\n
    \        let g:EasyMotion_verbose = 0\n
    \    "
    \ })

    When I hit the 'w' key, I get this error: E117: Unknown function: EasyMotion#LineAnywhere. What am I doing wrong ?

    Shougo
    @Shougo
    I cannot reproduce the error
    It seems vim-easymotion's bug
    You should update it
    Gontran Baerts
    @gbcreation
    I deleted my local clone of easymotion and called dein#update(). But i have the same error.
    Shougo
    @Shougo
    You should create minimal vimrc
    set runtimepath^=~/work/dein.vim/
    call dein#begin(expand('~/.cache/test'))
    
    call dein#add('tpope/vim-repeat', {
          \ 'lazy': 1,
          \ 'on_map': '.'})
    call dein#add('tpope/vim-surround', {
          \ 'depends': ['vim-repeat'],
          \ 'on_map': 'cs'})
    call dein#add('tomtom/tcomment_vim', {
          \ 'on_map': ['gc', 'g<', 'g>', '<C-_>', '<Leader>_'],
          \ })
    call dein#add('easymotion/vim-easymotion', {
    \    'on_map': [['n', '<Plug>']],
    \    'hook_add': "
    \        nmap w <Plug>(easymotion-lineforward)\n
    \        nnoremap W     w\n
    \        nmap b <Plug>(easymotion-linebackward)\n
    \        nnoremap B     b\n
    \        nmap [Alt]j <Plug>(easymotion-j)\n
    \        nmap [Alt]k <Plug>(easymotion-k)\n
    \        nmap ' <Plug>(easymotion-prefix)\n
    \        let g:EasyMotion_startofline = 0\n
    \        let g:EasyMotion_show_prompt = 0\n
    \        let g:EasyMotion_verbose = 0\n
    \    "
    \ })
    call dein#end()
    
    if dein#check_install()
      call dein#install()
    endif
    
    syntax enable
    filetype plugin indent on
    Please test it.
    Gontran Baerts
    @gbcreation
    I put your lines in ~/.config/nvim/init.vim. But I have the same error.
    Shougo
    @Shougo
    Hm
    The error is reproduced without dein.vim?
    Why I cannot reproduce it.
    The function is defined.
    What is your Vim version?
    Gontran Baerts
    @gbcreation
    NVIM 0.1.3
    Shougo
    @Shougo
    My neovim version is 0.1.4-dev.
    I cannot reproduce it
    It seems your environment problem.
    You should update your neovim to the latest.
    Gontran Baerts
    @gbcreation
    It works when I use vim-plug
    Shougo
    @Shougo
    It works for me...
    Gontran Baerts
    @gbcreation
    OK, I will continue to test...
    Shougo
    @Shougo
    I cannot support it, because it works
    Gontran Baerts
    @gbcreation
    Thanks a lot for your help
    Shougo
    @Shougo
    You should test for other cases
    If other people can reproduce it, OK I will check though
    I have not much free time
    Gontran Baerts
    @gbcreation
    Don't worry. I anderstand :smile:
    I greatly appreciate your work.
    Gontran Baerts
    @gbcreation
    @Shougo I completely rewrote my initialization scripts from scratch and easymotion lazy loads as expected. So it should be a problem with my previous environment settings.
    Gontran Baerts
    @gbcreation
    I use the blueyed/vim-diminactive plugin. I would like to lazy load it only the first time I split the window. What kind of event should I use ?
    Wang Shidong
    @wsdjeg
    @gbcreation if you are using neovim.I think build from source is a good choice,before you open any issues,just run git pull ,make,sudo make install ,if you still get error,you can open issues
    Gontran Baerts
    @gbcreation
    @wsdjeg ok. Actually the problem was not related to my version of neovim, but probably to my initialization scripts
    Now it just works
    Maybe I had problems because I change the script in which I add plugins to Dein. The first one was plugin-list.vim, then I change to plugin-list-dein.vim without deleing the first one. So Dein cache didn't detect the change. Do you see what I mean ?
    This is the filename passed as second argument to dein#begin()
    Gontran Baerts
    @gbcreation
    Do I have to call dein#clear_state() manually when I change vimrcs passed to dein#begin() ?
    Shougo
    @Shougo
    @gbcreation Please read the dein#begin() doc.
    Dein supports the detection.
    But you must specify the 2nd argument.
    Gontran Baerts
    @gbcreation

    This is my configuration:

    let s:plugins_dir = expand('~/.cache/nvim/dein')
    if !dein#load_state(s:plugins_dir)
        finish
    endif
    let s:pluginList=fnamemodify(expand('<sfile>'), ':h').'/dein-plugin-list.vim'
    call dein#begin(s:plugins_dir, [s:pluginList])
    execute 'source' s:pluginList
    call dein#end()
    call dein#save_state()
    if !has('vim_starting') && dein#check_install()
        call dein#install()
     endif

    Is it right ?

    The file pointed by the s:pluginList variable contains dein#add(...) calls
    Shougo
    @Shougo
    It is right if s:pluginList file path is valid.
    You should check it.
    Gontran Baerts
    @gbcreation
    ok, I see
    Now, if I change line 5 to let s:pluginList=fnamemodify(expand('<sfile>'), ':h').'/another-file.vim', is this change detected by Dein ?
    Wang Shidong
    @wsdjeg
    @gbcreation yes,I know,so it has been fixed,nice to hear
    Gontran Baerts
    @gbcreation
    Or does the script finish at line 3 ?
    Shougo
    @Shougo
    OK.
    I get it.