Open benlindsay opened 8 years ago
Hm, yes I think this makes sense. Perhaps it can be done in such a way that it doesn't break everyone's configs.
I think that if the expected prefix for the shipped templates is just hard-coded as =template=
and prevented from being changed by the user, no one's configs would break. I doubt anyone changes the names of the shipped templates inside the repo.
Agreed. That would be a safe bet, but actually looking over the current setup, this might be a good opportunity to cleanup the variable names to make them more clear.
What about the following:
g:templates_name_prefix
-> g:templates_pwd_prefix
g:templates_global_name_prefix
-> g:templates_global_prefix
g:templates_directory
g:templates_builtin_prefix
And then to make it not break configs, we would still look for the two old variables and set the new ones automatically.
Thoughts?
I personally don't think the new names proposed for the first two increase clarity enough to be worth breaking people's configs. I would just recommend adding the g:templates_builtin_prefix
variable with =template=
as the default value. To be honest though, I already switched to vim-skeleton because, even though it doesn't have the nice builtin templates like vim-template, I found it easier to customize for my purposes.
I want to be able to have access to the shipped templates in your plugin, but I'd also like to have my own global templates that look like
~/.vim/templates/
of the formtemplate.ext
instead of=template=.ext
. I just changed. For me it works fine to just changeg:templates_global_name_prefix
tog:templates_name_prefix
on line 516 and just changeg:templates_name_prefix
in my.vimrc
, but it might be better to just preventg:templates_global_name_prefix
from setting the expected prefix for the shipped templates since we don't need to change file names of your shipped templates.