Highlight all occurrence of a selected word?

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

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

15条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 10:33

    1. Add those lines in your ~/.vimrc file

    " highlight the searched items set hlsearch " F8 search for word under the cursor recursively , :copen , to close -> :ccl nnoremap :grep! "\<\>" . -r:copen 33

    1. Reload the settings with :so%
    2. In normal model go over the word.

    3. Press * Press F8 to search recursively bellow your whole project over the word

提交回复
热议问题