Hi!

On Mon, Dec 03, 2012 at 05:53:58PM -0500, Benjamin R. Haskell wrote:
> Probably, as it suggests there, you could just use \zs instead:
> 
> \\\n\\\n\zsU

You right, but \zs doesn't work for me. I'm writing syntax highlight rules
for mkfile (OS Inferno/Plan9 variant of Makefile). It allow any amount of \
at EOL, so these are the same:

VAR=U=value

VAR\
\
=\
\
U\
\
=\
\
    value

So, I'm trying to match "U" between "=" with any amount of \\\n between them:

    syn match mkfileVarAttr     contained 
"^\w\(\w\|\\\n\)*\(\s\|\\\n\)*=\(\(\\\n\)*\(=\|U\(\\\n\)*=\)\)\?"
            \ contains=mkfileVar,mkfileDelimiter,mkfileAttr
    syn match mkfileVar         contained "^\(\w\|\\\n\)*\w"
    syn match mkfileDelimiter   contained "="
    syn match mkfileAttr contained "\(=\(\\\n\)*\)\@<=U\(\(\\\n\)*=\)\@="

and using \zs in mkfileAttr doesn't work.

-- 
                        WBR, Alex.

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui