fuzzylizard Posted March 30, 2003 Report Share Posted March 30, 2003 I think this is programming related, anyway... I was using vim last night to edit some programs and accidently typed in '/y'. Now the program is highlighting every y on the page. And to make things worse, this pattern matching persists beyond closing the program. I am a vim newbie, how do I turn this off? Quote Link to comment Share on other sites More sharing options...
bvc Posted March 30, 2003 Report Share Posted March 30, 2003 Sorry, I don't know either...but you might find your answer in /usr/share/vim/doc/pattern.txt Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted March 30, 2003 Report Share Posted March 30, 2003 What happens if you do a new pattern match, does the new one persist? Quote Link to comment Share on other sites More sharing options...
fuzzylizard Posted March 30, 2003 Author Report Share Posted March 30, 2003 Yep, I can pattern match anything and the annoying highlights just shift to the new pattern. And yea, it persists. Very annoying. I will check out the link above for the answer. No vim gurus out there?!? Quote Link to comment Share on other sites More sharing options...
aru Posted March 30, 2003 Report Share Posted March 30, 2003 I think this is programming related, anyway... I was using vim last night to edit some programs and accidently typed in '/y'. Now the program is highlighting every y on the page. And to make things worse, this pattern matching persists beyond closing the program. I am a vim newbie, how do I turn this off? Within the session, after a search you can remove the highlight by typing in command mode ":noh" , or faster, enter a new search which doesn't exist (ie: /adfasdfasd) If you dislike the search highlighting and you want to remove that feature, then edit your ~/.vimrc file and append this: "set nohlsearch" Quote Link to comment Share on other sites More sharing options...
fuzzylizard Posted March 30, 2003 Author Report Share Posted March 30, 2003 The :noh worked perfectly, thanks. Quote Link to comment Share on other sites More sharing options...
Guest lahtris Posted January 6, 2011 Report Share Posted January 6, 2011 put this in your .vimrc nmap <SPACE> <SPACE>:noh<CR> after you perform a search, pressing space in normal mode will still do what space did (usually advance one character), but also clear the highlighting. This way, you can leave the highlighting on if you want (by not hitting space). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.