I have :set hlsearch
as default value.
When I search for something, search terms get highlighted. However many times I want to get rid of the highlight, so I do :set nohlsearch
. In this way I get rid of highlights for the time being.
However if I do a new search, then search terms are not highlighted.
I would like to hit ESC + ESC to get rid of highlights and then set back :set hlsearch
.
Any suggestions?
Its most likely because you are visual select mode (which you get to by pressing the 'v' key in command mode). Try pressing Esc twice to see if that gets you out of it. Another clue on this would be that it would say -- VISUAL -- in the status line.
You can change color schemes at anytime in vi by typing colorscheme followed by a space and the name of the color scheme. For more color schemes, you can browse this library on the vim website. You can enable or disable colors by simply typing "syntax on" or "syntax off" in vi.
Try the :noh
command.
vi/vim notes
I use
/pleasedisablehighlightthanks
command. Or just
/qewrufhiqwe
But you should be carefult not to mix this with the following command!
/qewrufhiqew
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With