Aug
20
2008
20
2008
Use “\c” anywhere in a search to ignore case (overriding your ignorecase or smartcase settings).
e.g. “/\cfoo” or “/foo\c” will match foo, Foo, fOO, FOO, etc.
Use “\C” anywhere in a search to force case matching.
e.g. “/\Cfoo” or “/foo\C” will only match foo.
You can set vim to ignore case on all your searches by running “:set ignorecase“.
If “ignorecase” is on, you can vim to ignore case on searches of only lowercase letters by running “:set smartcase“. (Searches with any capitalization or with “\C” will run a case-sensitive search.)
from Vim’s :help ignorecase and :help smartcase