Am 07.02.2012 18:29, schrieb Thilo Six:
I had a rather usefull discussion with Andriy Sokolov offlist. He
pointed out to me:

,----[ :h syn-pattern   ]---------------------
Syntax patterns are always interpreted like the 'magic' option is set,
no matter what the actual value of 'magic' is.  And the patterns are
interpreted like the 'l' flag is not included in 'cpoptions'.  This
was done to make syntax files portable and independent of 'compatible'
and 'magic' settings.
`---------------------------------------------

To me this sounds like the whole subject is already handled inside of
Vim and no additional settings regarding 'set cpo+=l' inside of vim
(syntax) scripts is needed. Is this correct?

I'd say: yes

Test:
    :new
    :put = \"abc\tdef\"
    :set cpo+=l
    :syn match Test /c[\t]d/
    :hi link Test StatusLine
    " I can see highlighted text
    /c[\t]d
    E486: Pattern not found: c[\t]d

And, btw, that :syn-pattern help section isn't new, it's found even in
Vim 5.7 (!)

--
Andy

--
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