Google closure templates

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Google closure templates

Fabien Meghazi-2

Hi all,

Did someone already started to work on a google closure template
highlight scheme ?

If not, I've got a question :

Is it possible for vim to have a kind of "additional" highlight layer ?

In the case of templates, the source could be html, svg, xml, plain
text, whatever.
But if you would like to add the template syntax highlighting, how
could you make this without loosing the syntax highlight of the
source.

Here's an example :

I've got an html file. I have the syntax highlighting of html.
Everything is fine except that the file happens to be a google closure
template,
so I'd like the closures statements  (eg:  {template xxxxx}    { if
xxx } { else xxxxx } ) to be highlighted
and the folding to be applied to the template statement  ( eg:
{template xxxxx}  )

How can I do this while keeping the html highlighting ?

--
Fabien Meghazi

Website: http://www.amigrave.com
Email: [hidden email]
IM: [hidden email]

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Google closure templates

Benjamin Fritz



On Nov 16, 4:26 am, Fabien Meghazi <[hidden email]> wrote:
> Is it possible for vim to have a kind of "additional" highlight layer ?
>
> In the case of templates, the source could be html, svg, xml, plain
> text, whatever.
> But if you would like to add the template syntax highlighting, how
> could you make this without loosing the syntax highlight of the
> source.
>

I don't know enough about your specific syntax, but there are a few
options. You can include one syntax file into another. See

http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file

A simpler solution, if the syntax is appropriate, is to just use the
"containedin" and "contained" options in your definitions to include
your rules only inside the appropriate HTML syntax group.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---