ThoML wrote: >> It always has seemed to me to be a bit of a battle to handle continued >> lines. >> > > If you define a pattern like this: > > syn match escapedChar /\\\_./ > > or maybe in your case: > > syn match escapedChar /\\\n/ > > before any other rule, there might be a chance to handle these cases > if escapedChar is included in a cluster and an eligible pattern at > this position. At least, that's the way this is handled in viki. > > In most circumstances it would probably be preferable though to have a > magic version of . or \_. that is aware of a filetype-specific > continuation pattern. (In vimscript, the continuation is defined by > the next line.) > > In conjunction with syn-region you could also use skip, I suppose. > The problem is that there becomes a proliferation of multiple attempts to get continuation working. With a small syntax, its doable; with a large syntax like vim, which is complicated enough, its difficult enough just getting the syntax minus continuation working; testing is also difficult. Besides, the newline is important to both vimscript and matlab script -- ie. neither language is whitespace insensitive; newlines are used to delimit statements (except under their respective continuation conditions). Consequently one cannot simply ignore newlines and optional continuation sequences.
Syntax highlighting is also often expected to support folding -- which means that one must understand continued lines correctly. Regards, Chip Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
