In vi or vim, we use / to search for a string. If we want the searching matches either string1 or string2, we can do:
/string1\|string2
If we also want to search for more strings at the same time, we certainly can:
/string1\|string2\|string3\|string4
If we want to ignore cases during the search, we can set the ignorecase option before the search.
:set ic
To remove the ignorecase option:
:set noic
Monday, April 1, 2019
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment