简体   繁体   English

“语法大小写忽略”是否从 vim 7.3 更改为 vim 7.4?

[英]Has "syntax case ignore" changed from vim 7.3 to vim 7.4?

I suspect that the command syntax case ignore has changed between the versions 7.3 and 7.4我怀疑命令syntax case ignore在 7.3 和 7.4 版本之间发生了变化

Here is my rather small test file ( test_1.vim ):这是我相当小的测试文件( test_1.vim ):

syntax clear
syntax on
syntax case ignore

syntax match   garbage  "[^ \t]"
syntax match   ident    "[a-z][a-z0-9]*"
syntax keyword keyw      foo bar baz

highlight def link garbage   Error
highlight def link ident     Normal
highlight def link keyw      Function

I want to apply this syntax file on this file ( test_1.no-no ):我想在这个文件( test_1.no-no )上应用这个语法文件:

foo abc ABC

When I open the file like so当我像这样打开文件时

gvim -u NONE test_1.no-no "+source test_1.vim"

the three words are highlighted as expected in vim 7.3.这三个词在 vim 7.3 中按预期突出显示。

Yet, in vim 7.4, the word ABC seems to be considered garbage as it is highlighed with the "Error colors".然而,在 vim 7.4 中, ABC这个词似乎被认为是垃圾,因为它用“错误颜色”突出显示。

Am I missing something or is this change in appearance expected?我是否遗漏了某些东西,或者这种外观变化是预期的吗?

I can reproduce this with the Vim 7.4.000 that ships with Ubuntu 13.10, but not with a self-compiled Vim 7.4.135.我可以使用 Ubuntu 13.10 附带的 Vim 7.4.000 重现这一点,但不能使用自编译的 Vim 7.4.135。 Looks like a bug in the new NFA-based regular expression engine that has been fixed in the meantime.看起来像在此期间已修复的新的基于 NFA 的正则表达式引擎中的错误。

If you cannot upgrade to a newer Vim version, you can work around this by switching back to the old engine via如果您无法升级到较新的 Vim 版本,您可以通过以下方式切换回旧引擎来解决此问题

:set regexpengine=1

In the future, these kind of questions and bug reports are best addressed to the vim_dev mailing list .将来,最好将此类问题和错误报告发送到vim_dev 邮件列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM