vim-templates
vim-templates copied to clipboard
Add an option to change templates path
I’m using VIM in different contexts (personal & work) and need different templates for a given file type according to context.
I’m missing a way to change the way my templates are loaded.
A PR is coming.
Hi, thank you for the patch. I’ve been thinking about it for a while and wondering if it might not make sense to impose a bit more policy. What kind of different values do you set this variable to in your own configuration? How does your templates directory structure look?
I’m keeping all my templates in .vim/templates directory and created a "work_templates" directory for the ones I’m using at work. Most of them are just symlinks to main ones. The Perl template is different, containing a header with my company name and work email address.
.vim/templates ├── work_templates │ ├── html -> ../html │ ├── javascript -> ../javascript │ ├── perl │ ├── python -> ../python │ └── sh -> ../sh ├── html ├── javascript ├── perl ├── plaintex -> tex ├── python ├── sh ├── tex └── vimwiki