[ic] syntax highlighting in templates (vi) HowTo
paul at gishnetwork.com
Wed Sep 28 20:49:29 UTC 2011
> From: emailgrant at gmail.com
> > For those of you who use VI and find that extension-less files such as
> > interchange templates and variables don't activate syntax highlighting, here
> > is the trick hinted to me by Peter Ajamian (who I don't want to imply uses
> > VI himself).
> > Within the first five lines of the file, put:
> > [comment]
> > // vim: filetype=html
> > [/comment]
> Thanks Paul. Has anyone found a way to deal with the weird vim
> highlighting that takes place with (I think) these characters:
> - Grant
You're referring that which is produced like in the query or perl tag... foo < bar?
I think I sometimes put [comment]>[/comment] after any tags that have that in there, as needed. Or was it <!-- > -->. One of those helps a little.
It would be nice if you can set vi to sense [perl] and switch to perl highlighting, and revert upon [/perl], etc.
More information about the interchange-users