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

后端 未结 4 980
醉酒成梦
醉酒成梦 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条回答
  •  -上瘾入骨i
    2020-12-02 07:58

    Use \< and \> for word start and word end, respectively.

    E.g. In your specific case you would use:

    /the\>/
    

提交回复
热议问题