vim-template
vim-template copied to clipboard
why if g:templates_global_name_prefix be definded to other string, the built-in templates will not be searched?
and the default value of g:templates_global_name_prefix should not be '=template=' but '=template=.', because the complete of command ':Template' is 'py', 'cpp', etc, if :Template py
, =template=.py
will not be searched. but if set g:templagtes_global_name_prefix to '=template=.', it can do.
but looks like when i set g:templates_global_name_prefix to '', the build-in templates will not be found. but user usually to download others template from github or other place, this templates will not start with '=template='. to make it be searched. i must set g:templates_global_name_prefix to '', but it make the build-in templates cannot work.
thanks!
That's because the g:templates_global_name_prefix
is applied to all attempts of searching templates, even for the build-in ones. I suppose that the best solution, which would also allow using templates from multiple sources more easily, would be allowing multiple prefixes, then something like the following would work for you (I think):
let g:templates_global_name_prefix = ['', '=template=']
How does that sound?
I create a plugin for myself to replace this plugin, so I must close all my issues of this repo because I cannot reproduce any of them.