Hello
>>> ,----[ :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.
>>> `---------------------------------------------
-- <snip> --
>> 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
>>
-- <snip> --
,----[ src/syntax.c ]-----------------------
/* Make 'cpoptions' empty, to avoid the 'l' flag */
cpo_save = p_cpo;
p_cpo = (char_u *)"";
ci->sp_prog = vim_regcomp(ci->sp_pattern, RE_MAGIC);
p_cpo = cpo_save;
`---------------------------------------------
Bram i do not speak any C but to me it seems that something like this should be
doable without great afford to cover all runtime files, too.
IIRC when we have discussed this topic here last year it had been suggested to
use a function to fix it once for all. Can't something like this be used to a
broader scope, too?
--
Regards,
Thilo
4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F
--
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