vim-templates icon indicating copy to clipboard operation
vim-templates copied to clipboard

Add an option to change templates path

Open pipoprods opened this issue 9 years ago • 2 comments

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.

pipoprods avatar Aug 12 '16 08:08 pipoprods

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?

ap avatar Aug 15 '16 01:08 ap

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

pipoprods avatar Aug 17 '16 07:08 pipoprods