In Vim, how do you search for a word boundary character, like the \b in regexp?

后端 未结 4 986
醉酒成梦
醉酒成梦 2020-12-02 07:14

I\'d like to be able to search

/the\\b

to find \"the\" but not \"then\".

I also tried searching with very magic turne

4条回答
  •  我在风中等你
    2020-12-02 08:03

    If very magic is turned on, then you shouldn't escape the > character. See what's magic search. SO in your case you'd do:

    /\v
    

    it would search for only the word 'the'.

提交回复
热议问题