I am trying to create a syntax file and I am having trouble in marking
out a comment region. The comment starts with an asterisk with the
first non white space character preceding it (including newlines)   a
semi-colon. The comment ends with a semi colon.

For example everything between (and including) the asterisk and the
semi colon is a comment:
;

  *safagdgghgh;


In contrast, in the following  case the asterisk and the semi-colon do
not enclose a comment since the first non white space character
preceding the asterisk is not a semi-colon

1234*abcd;


The contents of my syntax file:

syn case ignore

syn region tComment     start=";\_s*\zs\*"  end="\;"

hi tComment     term=bold cterm=NONE ctermfg=Red ctermbg=Black
gui=NONE guifg=Red guibg=White
syn sync fromstart


With the above, the following line gets colored correctly:
;  *adsafasff;

with everything between the asterisk and the semi-colon colored red.

However, it cannot deal with  line breaks, and the following text
remains unchanged:

;

*adsafasff;


The regexp starting the comment appears to be finding the right
pattern..

Is there any way I can handle line breaks?

TIA,

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

Reply via email to