[vim/vim] smartcase requires ignorecase (#9001)

39 views
Skip to first unread message

Steven Penny

unread,
Oct 15, 2021, 12:08:36 PM10/15/21
to vim/vim, Subscribed

Steps to reproduce

use set smartcase or similar

Expected behaviour

search for case, only case is found, not Case

Operating system

Windows

Version of Vim

v8.2.3386

Logs and stack traces

No response


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Gary Johnson

unread,
Oct 15, 2021, 12:38:57 PM10/15/21
to reply+ACY5DGC43K3MUTWZH2...@reply.github.com, vim...@googlegroups.com
On 2021-10-15, Steven Penny wrote:
> Steps to reproduce
>
> use set smartcase or similar
>
> Expected behaviour
>
> search for case, only case is found, not Case
>
> Operating system
>
> Windows
>
> Version of Vim
>
> v8.2.3386

That is intentional. From ":help 'smartcase'":

Override the 'ignorecase' option if the search pattern contains upper
case characters. Only used when the search pattern is typed and
'ignorecase' option is on.

Regards,
Gary

vim-dev ML

unread,
Oct 15, 2021, 12:39:13 PM10/15/21
to vim/vim, vim-dev ML, Your activity

On 2021-10-15, Steven Penny wrote:
> Steps to reproduce
>
> use set smartcase or similar
>
> Expected behaviour
>
> search for case, only case is found, not Case
>
> Operating system
>
> Windows
>
> Version of Vim
>
> v8.2.3386

That is intentional. From ":help 'smartcase'":

Override the 'ignorecase' option if the search pattern contains upper
case characters. Only used when the search pattern is typed and
'ignorecase' option is on.

Regards,
Gary

Steven Penny

unread,
Oct 15, 2021, 12:51:40 PM10/15/21
to vim/vim, vim-dev ML, Comment

It seems like a pointless extra step to have to use both. It should really just be a single ternary setting, or setting smart case should set ignore case automatically.


You are receiving this because you commented.

Bram Moolenaar

unread,
Oct 15, 2021, 2:16:24 PM10/15/21
to vim/vim, vim-dev ML, Comment

Closed #9001.


You are receiving this because you commented.

Bram Moolenaar

unread,
Oct 15, 2021, 2:16:24 PM10/15/21
to vim/vim, vim-dev ML, Comment

The idea is that you can set 'smartcase' always, and then selectively set 'ignorecase' when desired.
Anyway, it has always worked like this, changing it now will not be appreciated by existing users.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages