Redact code and Embryo snippets

Posted at 2005-04-20

In case you're already using Redact to write Edjes (and you know you should!), here's a nice way to properly hilight inlined Embryo code in Vim.

Grab the ruby-small syntax file, and copy it to ~/.vim/syntax.

Now, whenever you put some Embryo/Small code in an Edje, do it like this:

blah.script =<SMALL
/* Embryo code goes here */
SMALL

That is, put the Embryo code into an heredoc that uses "SMALL" as the delimiter. If you set the syntax for the buffer to "ruby-small" now, the code inside the heredoc will be formatted as Embryo code :)

Tags , ,