Closed dkearns closed 1 year ago
Hm, have you tried adding \c
to the pattern?
interestingly, the help states exactly this:
https://vimhelp.org/options.txt.html#%27smartcase%27
Only used when the search pattern is typed
Not sure why it would come into effect here.
I also sent an update to Bram: https://github.com/vim/vim/pull/12611
Thanks @chrisbra.
Setting
b:match_ignorecase
is insufficient to allow case-ignored matching of words ifsmartcase
is set and theb:match_words
pattern contain uppercase characters.I noticed this when configuring Matchit for Forth. The runtime files maintainer requested the words be specified in uppercase, as is the norm for that language, but the matching actually needs to be case insensitive.
So with the following Vim configuration
if
andthen
are not matched in the Forth example.I was under the impression that
smartcase
was only applied to some interactive searches but that doesn't appear to be the case.