nohlsearch VIM Command

How to use nohlsearch Command in Linux VIM editor?


nohlsearch command is used not to highlight every occurrence of searched word. When we use this command we can shift the cursor to the next occurrence using n command.


:set nohlsearch


  • Open the file test.txt
    $ vim test.txt
  • To turn off the highlighting of the searched string
    :set nohlsearch
  • Turn off hlsearch and search the string 'India' in the file.
    Enter /India
    nohlsearch Vim Command

Ask Questions

Ask Question