In the following search in Vim I would like to ignore the case of the first letter:
/[tlcp]omo
I would like to know how the case can be ignored only on the first letter of the search pattern.
Vim has the following options to ignore case in the search pattern:
:set ignorecase
:set smartcase [ignora caso si no hay ninguna mayúscula en la búsqueda]
or use \c
at any position in the search pattern:
/hola\c => [encuentra hola y HOLA]
But all of these options ignore the case on the entire pattern, not a part of it.
One option to ignore the single-letter case of the search pattern is, using the []
regular expression collection, to specifically case each letter:
/[tTlLcCpP]omo
But is there a way to ignore case in a part of the search pattern without having to specify each and every uppercase and lowercase letter using regular expression?