Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-29-2017, 10:59 AM
|
#1
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Rep:
|
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
|
|
|
08-29-2017, 11:36 AM
|
#2
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
I always just hit search, then mash the keyboard a bit to enter nonsense.
|
|
|
08-29-2017, 12:04 PM
|
#3
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep:
|
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
|
|
|
08-29-2017, 12:32 PM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,352
|
|
|
|
08-29-2017, 04:26 PM
|
#5
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep:
|
Thanks dugan.
Looks interesting.
Ken
|
|
|
08-29-2017, 05:51 PM
|
#6
|
Member
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229
Rep:
|
Hmm, can't you just use :noh to get rid of that?
|
|
1 members found this post helpful.
|
08-29-2017, 06:59 PM
|
#7
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep:
|
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 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?
|
|
|
08-29-2017, 10:00 PM
|
#8
|
Member
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634
|
Quote:
Originally Posted by taylorkh
...
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?
...
|
I wouldn't worry too much about that
Code:
sudo apt-get remove atom
The following packages will be REMOVED:
atom
0 upgraded, 0 newly installed, 1 to remove and 27 not upgraded.
After this operation, 243 MB disk space will be freed.
If you find vim useful, combining it with YouCompleteMe will reach a whole new level, allowing for a lot of autocompletion.
|
|
|
08-30-2017, 08:11 AM
|
#9
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Original Poster
Rep:
|
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
Ken
|
|
|
08-31-2017, 09:03 PM
|
#10
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,352
|
Quote:
Originally Posted by taylorkh
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?
|
I think you might enjoy this:
http://www2.b3ta.com/heyhey16k/
|
|
|
All times are GMT -5. The time now is 06:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|