Thanks Ben, I learned a lot in that tip. After some hours of fidudling around. My soltion was adding this http://vim.pastey.net/108866-n6h4 in the default lzx.vim. I copied some of it the xml.vim. Right now, I can have folds on every LZX tags, and remaining the syntax highlight given by the default lzx.vim
On Feb 24, 4:48 am, Ben Fritz <[email protected]> wrote: > On Feb 23, 9:48 am, ragingmon mon <[email protected]> wrote: > > > > > hi all, > > > I've been reading the :help syn for hours and still I can't get this problem > > right. > > My problem is related to OpenLaszlo LZX files, here is the syntax file > > (lzx.vim) <http://labs.openlaszlo.org/trunk-nightly/tools/lzx.vim> > > LZX is an xml based language. And my problem is all about folding the way > > like xml-folding does. I want to have xml-folding without overlapping the > > lzx syntax. > > > The lzx syntax file (lzx.vim) can only fold (by using 'set > > foldmethod=syntax') the <method> and <script> tags, but the rest of the tags > > are not folded. Like <view>, <class>, etc.. Yeah I know I can use > > xml-folding, but using it will make the javascript syntax in the lzx files > > all white (or not recognized). For example: > > > <handler> > > var = vartest; > > this.vartest; // just a comment > > // the 'var' and 'this' have colors when xml-folding is not activated. But > > when it is activated, everything is white, and everything inside the handler > > is not recognized as javascript. So using EhnCommentify won't work anymore.. > > </handler> > > > What I want is to have the normal xml like folding in LZX. How can I have > > that kind of folding and still having the syntax highlight that is give by > > lzx.vim > > This tip does something vaguely similar, in that it takes a pre- > existing syntax without a lot of folding, and adds fold rules while > preserving the syntax highlighting. > > It certainly won't apply directly, but you may be able to glean some > ideas and techniques from it. > > http://vim.wikia.com/wiki/Syntax_folding_of_Vim_scripts --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
