Highlight all occurrence of a selected word?

后端 未结 15 1723
难免孤独
难免孤独 2020-12-12 10:05

How can I highlight all occurrence of a selected word in GVim, like in Notepad++?

15条回答
  •  长情又很酷
    2020-12-12 10:30

    Why not just: z/

    That will highlight the current word under cursor and any other occurrences. And you don't have to give a separate command for each item you're searching for. Perhaps that's not available in the unholy gvim? It's in vim by default.

    * is only good if you want the cursor to move to the next occurrence. When comparing two things visually you often don't want the cursor to move, and it's annoying to hit the * key every time.

提交回复
热议问题