garbas / vim-snipmate

snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim.
www.vim.org/scripts/script.php?script_id=2540
2.01k stars 181 forks source link

E117: Unknown function: vam#DefineAndBind #263

Closed yangzhanlong closed 10 months ago

yangzhanlong commented 6 years ago

when i open a new file with vim, it will display the error

Error detected while processing /home/yang/.vim/plugin/vim-addon-mw-utils/autoload/glob.vim:
line    1:
E117: Unknown function: vam#DefineAndBind
E15: Invalid expression: vam#DefineAndBind('s:c','g:glob_like', '{}')
line    4:
E121: Undefined variable: s:c
line    5:
E121: Undefined variable: s:c
E116: Invalid arguments for function get(s:c, 'glob_cache', {})
E15: Invalid expression: get(s:c, 'glob_cache', {})
line    6:
E121: Undefined variable: s:c
E15: Invalid expression: s:c['glob_cache']
Error detected while processing /home/yang/.vim/bundle/vim-addon-mw-utils/autoload/glob.vim:
line    1:
E117: Unknown function: vam#DefineAndBind
E15: Invalid expression: vam#DefineAndBind('s:c','g:glob_like', '{}')
line    4:
E121: Undefined variable: s:c
line    5:
E121: Undefined variable: s:c
E116: Invalid arguments for function get(s:c, 'glob_cache', {})
E15: Invalid expression: get(s:c, 'glob_cache', {})
line    6:
E121: Undefined variable: s:c
E15: Invalid expression: s:c['glob_cache']
Error detected while processing /home/yang/.vim/plugin/vim-addon-mw-utils/autoload/tiny_cmd.vim:
line    3:
E117: Unknown function: vam#DefineAndBind
E15: Invalid expression: vam#DefineAndBind('s:c','g:vim_tiny_cmd', '{}')
Error detected while processing /home/yang/.vim/bundle/vim-addon-mw-utils/autoload/tiny_cmd.vim:
line    3:
E117: Unknown function: vam#DefineAndBind
E15: Invalid expression: vam#DefineAndBind('s:c','g:vim_tiny_cmd', '{}')`

how can i reslove it?????? @ajzafar

ajzafar commented 6 years ago

@yangzhanlong It looks like that error is coming from a file in MarcWeber/vim-addon-mw-utils that SnipMate never uses. It seems to depend on MarcWeber/vim-addon-manager, which isn't required for SnipMate. Can you try making a minimal config setup that reproduces this error? That is, a minimal vimrc with nothing that isn't needed to produce this error, with only the plugins installed needed to produce this error. We can get a better idea of why this file's getting loaded. I've also been thinking about how to remove that vim-addon-mw-utils dependency SnipMate currently has, and it's doable but I haven't gotten to it yet. So hopefully this problem will go away then as well.

ajzafar commented 10 months ago

I'm closing this due to time, inactivity, and the fact that I don't think it's related to SnipMate.

If anyone has this issue, please report it to the VAM folks.