Wednesday, August 19, 2009

Re: Syntax for C code embedded within another language

Marvin Humphrey wrote:
> Greets,
>
> I'm writing a Vim syntax file for a small, purpose-built language.
> Everything's working great for the most part.
>
> There's one thing I don't know how to do, though. The language allows
> C code
> to be embedded between certain tags:
>
> __C__
> /* C code here. */
> static char foo[] = "foo";
> __END_C__
>
> How can I get C syntax highlighting to apply between __C__ and
> __END_C__?
>
Here's some suggestions:

* read :help syntax-include
*look over syntax/vim.vim and how it includes support for embedded perl
(vim ..vim.vim, /-- perl )

Regards,
Chip Campbell


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

No comments: