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
-~----------~----~----~----~------~----~------~--~---