I have the following in my .vimrc
:
au BufNewFile,BufRead *.pt set filetype=xml
This is needed because although I'm editing a file with *.pt
extension, it's indeed a valid xml file: setting the filetype like this I can have syntax highlighting.
I'm using vim's snipmate plugin, and tried to create pt.snippets to specific needs since these files are Zope Page Templates (ZPT with TAL).
Now, I have a problem: I don't want to create these snippets in xml.snippets, since they aren't really generic xml snippets, but my *.pt
files are set to xml, so when I define my pt snippets they aren't loaded unless I run :set filetype=pt
on my pt file on vim - but then I lose syntax highlighting.
I would like to be able to have a pt file, with xml syntax highlighting, to be able to load a pt.snippets file from snipmate. How can I do it?
(I would like to avoid putting my snippets in a generic snippet file, I would like it to be present only in pt.snippets to be easier to maintain.)