idanarye / vim-dutyl

Coordinate D tools to work together for you
http://www.vim.org/scripts/script.php?script_id=5003
79 stars 13 forks source link

E117: Unknown function: dutyl#register#tool #1

Closed yglukhov closed 10 years ago

yglukhov commented 10 years ago

After installing dutyl with Vundle, MacVim doesn't like the dutyl#register#tool calls. vimrc:

...
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

Bundle 'idanarye/vim-dutyl'

let g:dutyl_stdImportPaths=['/Volumes/Work/Projects/druntime/src', '/Volumes/Work/Projects/phobos']

call dutyl#register#tool('dcd-client','/Volumes/Work/Projects/DCD/dcd-client')
call dutyl#register#tool('dcd-server','/Volumes/Work/Projects/DCD/dcd-server')
...
line   49:
E117: Unknown function: dutyl#register#tool
line   50:
E117: Unknown function: dutyl#register#tool
idanarye commented 10 years ago

You should only call dutyl#register#tool after the call to vundle#end. Before the call to vundle#end Vundle has not yet updated &runtimepath which means dutyl/register.vim is not yet in the autoload path and dutyl#register#tool won't be able to activate the call to autoload.

This is true for all plugin managers, and I'll add it to the vimdoc and the readme

yglukhov commented 10 years ago

Ah.. Ok, thanx for that.