View Full Version : ARGH! Odd gVim text coloration?
DonQuixote
April 12th, 2006, 11:53 PM
Hey all,
I was using gVim and I guess I pressed a combination of keys and voila! I now have a bright red background color behind every instance of every string of ");" in one of my files, like this );, well ok, not like that... it's the background that is red.
I have NO idea what I did, or how to change it back.
Any help would be most appreciated!
Thanks!
DonQuixote
April 13th, 2006, 12:00 AM
Ok... it seems that I somehow used the "Find" command... what I need to know is how to turn it off?
Thanks!
jrib
April 13th, 2006, 01:40 AM
well there is the newbie method I used for a while:
/asdjfioasjfois
Which would search for 'asdjfioasjfois' and of course fail so there is no highlight.
Then there is the smart way, by doing :nohlsearch or :noh for short.
And you can disable it for the rest of your session with :set nohlsearch
Add that to your ~/.(g)vimrc of course to never have to bother again.
xenmax
April 13th, 2006, 01:55 AM
I would also do _jason's method of tying a few gibberish characters to turn off search highlighting, but i recently found this method which I prefer now - add a key mapping to turn off search highlighting in (g)vimrc file:
map <silent> <F3> :nohl<CR>
When i hit F3, highlight is off. Note that this DOES NOT clear search buffer. Next time i hit "n" or "N", i get search highlight back.:)
DonQuixote
April 13th, 2006, 11:11 AM
Guys,
Thanks so much for the help!
DonQuixote
April 13th, 2006, 11:25 AM
xenmax,
Is that command exactly as I would enter it into the .vimrc file?
Thanks!
xenmax
April 13th, 2006, 11:51 AM
Is that command exactly as I would enter it into the .vimrc file?
Yes, that should work.
RafG
April 13th, 2006, 05:59 PM
map <silent> <F3> :nohl<CR>
When i hit F3, highlight is off. Note that this DOES NOT clear search buffer. Next time i hit "n" or "N", i get search highlight back.:)
I use a 'toggle'. In case anyone is interested:
map <F6> :set hls!<bar>set hls?<CR>
jrib
April 16th, 2006, 10:56 PM
I use a 'toggle'. In case anyone is interested:
map <F6> :set hls!<bar>set hls?<CR>
This is great, I'm going to use it. Thanks!
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.