These are chat archives for Shougo/dein.vim

17th
Apr 2016
Shougo
@Shougo
Apr 17 2016 04:35
Yes, you can
My easy motion example:
[[plugins]]
repo = 'easymotion/vim-easymotion'
on_map = [['n', '<Plug>']]
hook_add = '''
  nmap w <Plug>(easymotion-lineforward)
  nnoremap W     w
  nmap b <Plug>(easymotion-linebackward)
  nnoremap B     b
  nmap [Alt]j <Plug>(easymotion-j)
  nmap [Alt]k <Plug>(easymotion-k)
  nmap ' <Plug>(easymotion-prefix)

  let g:EasyMotion_startofline = 0
  let g:EasyMotion_show_prompt = 0
  let g:EasyMotion_verbose = 0
'''
Gontran Baerts
@gbcreation
Apr 17 2016 09:07
Thank you for the example. I'm going to test.
Gontran Baerts
@gbcreation
Apr 17 2016 09:24

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
Apr 17 2016 10:05
I cannot reproduce the error
It seems vim-easymotion's bug
You should update it
Gontran Baerts
@gbcreation
Apr 17 2016 10:12
I deleted my local clone of easymotion and called dein#update(). But i have the same error.
Shougo
@Shougo
Apr 17 2016 10:13
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
Apr 17 2016 10:22
I put your lines in ~/.config/nvim/init.vim. But I have the same error.
Shougo
@Shougo
Apr 17 2016 10:25
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
Apr 17 2016 10:36
NVIM 0.1.3
Shougo
@Shougo
Apr 17 2016 10:37
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
Apr 17 2016 10:46
It works when I use vim-plug
Shougo
@Shougo
Apr 17 2016 10:47
It works for me...
Gontran Baerts
@gbcreation
Apr 17 2016 10:47
OK, I will continue to test...
Shougo
@Shougo
Apr 17 2016 10:47
I cannot support it, because it works
Gontran Baerts
@gbcreation
Apr 17 2016 10:48
Thanks a lot for your help
Shougo
@Shougo
Apr 17 2016 10:48
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
Apr 17 2016 10:55
Don't worry. I anderstand :smile:
I greatly appreciate your work.
Gontran Baerts
@gbcreation
Apr 17 2016 18:12
@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.