Yongwei Wu schrieb:
> I am trying to implement the COMMENT directive in the MASM syntax file:
> 
> Treats all text between or on the same line as the delimiters as a comment.
> 
> COMMENT delimiter [[text]]
> [[text]]
> [[text]] delimiter [[text]]
> 
> The current way I deal with it is:
> 
> syn match masmComment        "COMMENT\s*\(\W\)\_.\{-}\1.*"
> 
> However, when the first line (containing `COMMENT') is not visible,
> refreshing the page will immediately render the highlighting wrong:
> the lines are no longer regarded as comments.
> 
> I tried using region, but 1) I do not know how to let `end' find
> exactly the same delimiter as `start'; 2) refreshing the display still
> make the highlighting fail.
> 
> I find that the multi-line C comments do not exhibit this problem. But
> I am not able to figure out the magic. Any help?
> 
> Best regards,
> 
> Yongwei

:help :syn-ext-match

HTH Andy


        

        
                
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de

Reply via email to