Closed chocolateboy closed 9 years ago
I think I should remove both &ignorecase
and &smartcase
to match perl re.
But keep an option to let user have a choice(your pr).
What do you think about it?
I think the behaviour implemented in this pull request should be the default, since I have things set up to DWIM with &ignorecase
and &smartcase
and the current behaviour breaks this.
Also, this PR implements the behaviour requested in #4 and doesn't break #7, whereas the current version doesn't fully implement #4 (because it breaks &smartcase
). IMO, in this context, preserving vim compatibility is more important than preserving Perl compatibility. After all, we can change vim's settings, but we can't change perl's defaults (not in vim, at least).
That said, I don't mind if the behaviour in this PR is enabled by an option. I just think the other way round makes more sense :-)
I will add an option in case people want to match all lowercase and follow perl re
Thanks!
before (breaks
&smartcase
):/i
if&ignorecase
and not/I
after (honours
&ignorecase
and&smartcase
):(?i)
,(?I)
,\c
,\C
,/i
and/I