I use Vim to read man pages. But I’m having trouble searching for variables. For example I use:
/\<-s\>
to search for ‘-s’, but it doesn’t find anything. Grrr. I see it in the file. What am I doing wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
\<matches the beginning of a word, and-normally isn’t considered a word character. Do:set iskeyword?to see what characters are considered word characters.Try this:
Should work then. See
:h /\<and:h 'iskeyword'.