20
7
I want to search for an exact word in Vim in command mode (using Vim command /wordtosearch
, NOT the search of the current word at the cursor using *
or #
commands), e.g. I would like to search for an exact word say CIF but I do not want to find CIF_handle or CIF_drv.
How to make Vim search for exact word in the command mode?
(I don't mind the case of the word searched, because I already have ignorecase
set.)
Doesn't work with brackets. – None – 2017-07-06T14:52:18.533
@Thanks: workd nicely. Does enclosing the word in < .. > make it a regex based search. – goldenmean – 2010-10-29T10:19:30.403
Yes, it's a regex search. – Janne Pikkarainen – 2010-10-29T10:22:04.800
How do you configure
vim
to behave with an exact word search without needing to wrap it with\<
and\>
char. Canvim
be made to do exact word search by/eightFoldPaths
? – typelogic – 2019-09-14T21:43:10.150But what do u do if u need to search for a string like "1...". It will highlight all numbers starting with 1 and not the string with the dots. – scigor – 2012-11-09T10:43:21.047