Tell vim to FORGET WHAT I LAST SEARCHED FOR!
On one of my CentOS 7 servers I accidentally executed a search (? in command mode) in vim while editing /etc/fstab. The couple of characters I accidentally searched for were highlighted as expected. Unexpectedly and annoyingly those two characters are highlighted in every file I open in vim on that machine - provided the characters are present in the file of course.
I have found a lot of references to the search capabilities of vim but nothing about finishing the search and getting on with business. So the question is... How do I tell vim NOT to search any more? TIA, Ken |
I always just hit search, then mash the keyboard a bit to enter nonsense.
|
Thanks suicidaleggroll.
That would certainly do the trick. I was looking for something "built in" which I had overlooked. For my next trick I decided to figure out where vim saved its "history." Seems it is in ~/.viminfo. Wow! What a bunch of crap it stores. Almost as bad as browser history. I cleared the item titled "# Last Search Pattern:" and that seemed to do the trick. There is also a section with search history going back how far I do not know as I do not use search in vim except by accident or in the test. Unbelievable. Ken |
|
Thanks dugan.
Looks interesting. Ken |
Hmm, can't you just use :noh to get rid of that?
|
Thank you dejank! That does the trick exactly. It seems from my further searching that :noh is short for :nohlsearch which make sense.
I am taking a Red Hat admin course at the local community college - just something to do, I am RETIRED :D The course is delving into vim deeper than I typically use it but only scratching the surface from what I am finding with my research. It is a tremendously full featured and complicated program. yum tells me the installed size of the package is 2.2 MB. By comparison, Wordstar on my Osborne CP/M computer fit on a 180 KB diskette with room for CP/M and some data files. Wordstar was a fully functional word processor AND a great program editor. I wonder if we are really moving forward? Ken p.s. I wonder if I can find a CP/M emulator? And my old Wordstar software? |
Quote:
Code:
sudo apt-get remove atom |
Thanks Sefyir,
Fortunately I do not have atom installed on my CentOS 7 machines nor on a couple of Ubuntu Mate 16.14 virtual machines. I do not know what it is and probably don't want to know :D Ken |
Quote:
http://www2.b3ta.com/heyhey16k/ |
All times are GMT -5. The time now is 04:20 AM. |