Hi,

I'm trying to write a syntax file for an XML based filetype that
contais SQL code.
The ft is jelly script (form apache), well actually a variation of it
(gel script) but it doesn't really matter, I think.

So, there's the tag pair <sql:someoperetion
attribute="value"></sql:someoperation>.

What I did:
I copied xml.vim to jelly.vim and then :%s/xml/jelly/g
Then I added these lines
-------------------------------------------------------------------------
syntax include @sql $VIMRUNTIME/syntax/sql.vim
syntax region sqlCode
\ start=+<sql:.\{-}>\s*\%[<!\[CDATA\[]+
\ keepend
\ end=+\%[[]][]]>]\s*<\/sql:\w\{-}>+
\ contai...@sql
-------------------------------------------------------------------------
just before
let b:current_syntax = "jelly"

This works fine for the SQL code, but I dont want the tags themselves
being highlighted as SQL, so I tried using offsets, but I can't seem
to get it working, whenever I use ms or me, the SQL is not highlighted
at all, and rs, re, hs and he make no difference whatsoever, no matter
what value I set (eg e+1, s-1 etc)

So how do I do it?

Also, I don't think copying the entire xml.vim is the best solution,
how could I use the file itself in my jelly.vim? I tried
source $VIMRUNTIME/syntax/xml.vim
and adding the SQL lines after but it didn't work.
I also tried
set ft=xml
likewise, but no luck.

Well, that's it, I'm really lost here, I think I'm overlooking
something in the help files but I can't find out what.

Thanks!

Vitor

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

Reply via email to