On May 18, 3:15 am, Hanspeter Portner <[email protected]> wrote:
> Hi list
>
> I'd like to extend a custom c-type syntax file (edc.vim) by including
> the syntax of Lua (lua.vim)
> I use vim72http://trac.enlightenment.org/e/browser/trunk/edje/data/edc.vim
>
> Below is an example file I'd like to get highlighted correctly.
>
> =>What I'd like to do is: everything in the matching pair of curly
> braces after lua_script shall be highlighted by lua.vim
> Thats what I've come up so far by reading examples and the help:
>
> -> using 'lua_script' as a pre condition
> syn include @Lua syntax/lua.vim
> syn match luaScript "lua_script" nextgroup=luaBlock
> syn region luaBlock start="{" end="}" contai...@lua
> -> does not work, because the other braces are matched too, everything
> after collections is considered Lua code
>

I'd start by making luaBlock a "contained" match.

:help :syn-contained is somewhat misleading; a "contained" syntax item
will also be recognized if it's part of a nextgroup.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to