Will Gray (graywh)
unread,Mar 18, 2011, 11:35:16 AM3/18/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xptemplate
When starting Vim with --noplugin, xpt isn't loaded, but the ftplugins
still get loaded, causing all kinds of errors. I find the whole idea
of mixing the .xpt.vim files with the normal ftplugins a little dirty
anyway. I think things would be better if templates were kept in a
separate directory (a la snipmate). It will require a new 'au
FileType * exec 'runtime! xptemplates/'.&filetype'.vim
xptemplates/'.&filetype.'_*.vim xptemplates/'.&filetype.'/*.vim' and
several other changes. Sure, you can check that xpt was loaded, but
users would be required to add the same check to all their
personal .xpt.vim files, too. Using a different folder under 'rtp'
would also let you remove the .xpt.vim filename requirement.
Also, the help mentions that using g:xptemplate_snippet_folders
changes 'runtimepath', but 'rtp' is changed regardless. As a user of
pathogen.vim (the same applies for vundle users, too, I believe), it
doesn't make sense to store personal templates in path_to_xpt/person b/
c that folder is checked out from your git repository and isn't part
of my dotfiles repository. The docs say g:xptemlate_snippet_folders
should be avoided and is deprecated. The only other option that
leaves is placing them in ftplugin (either ~/.vim/ftplugin or some
other path in 'rtp' added by the user).