Thursday, April 19, 2012

Re: A syntax region that starts at ## and ends at the first non-^\s*#. How to do that?

On Thu, Apr 19, 2012 at 11:52:45AM -0300, Silas Silva wrote:
> I'm trying to write a syntax file for Tcl that supports Doxygen comments
> highlight. Doxygen comments are in comments like that:
>
> ## Doxygen comments start with "##"
> # They continue here...
> # and here
> # and so on.
>
> # But it is not a Doxygen comment anymore, because the comment block
> # was broken.
>
> I actually couldn't define a region to do that. It is clear for me how
> it should start, but how it should end?

Ah, it was simplier than I imagined:

syn region myComment start="##" skip="\n#" end='$'

An improvement of that might work.

Thank you very much.

--
Silas Silva

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: