:set ic ignores the case, how do you unset this?
In Vi I'm pretty sure you can also use :set noic (which is more intuitive)
Jason Down
2009-01-17 01:50:52
Sure,but even more intuitive, to me anyway, would be :unset ic. I guess I'll keep using vim anyway :)
Dave Ray
2009-01-17 01:52:59
Yes, that would be even nicer =)
Jason Down
2009-01-17 01:54:50
":help set" will tell you all about the :set command, including :set no{command} to unset a boolean, and even :set {command}! which toggles it
Gareth
2009-01-17 02:03:15
Cool, so you could do :set ic! to toggle it then?
Jason Down
2009-01-17 04:01:44
Yep, :set ic? confirms that :set ic! toggles between "ignorecase" and "noignorecase"
Adam Bellaire
2009-03-06 20:20:02
+3
A:
You can also toggle the setting with :set ic! and query its value with :set ic?
kyku
2009-03-06 20:17:17
A:
Pay attention to 'smartcase'
option. It overrides the 'ignorecase'
option if the search pattern contains upper case characters.
i.e. having 'ignorecase'
and 'smartcase'
on /foo
will find foo
, Foo
and FOO
, but /Foo
will find only Foo
, not foo
.
You can also tell Vim that you want to search case-sensitive despite of 'ignorecase'
setting by using \C
somewhere in the search pattern. By using \c
in the search pattern you tell Vim to ignore case while searching, despite of 'ignorecase'
setting.
Paul
2009-03-06 20:27:51