In the next search on Vim I would like to ignore the case of the first letter:
/[tlcp]omo
I'd like to know how the case can be ignored for only the first letter of the search pattern.
Vim has the following options to ignore the case in the search pattern:
:set ignorecase
:set smartcase [ignore case if no uppercase in search]
or use \c
it at any position in the search pattern:
/hello\c => [find hello and HELLO]
But all of these options ignore the case in the entire pattern, not in part.
One option to ignore the case of a single letter in the search pattern is, using the []
collection of regular expression, to specifically capitalize each letter:
/[tTlLcCpP]omo
But, is there any way to ignore the case in a part of the search pattern without having to specify each and every upper and lower case character using regular expression?