LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-10-2004, 11:03 AM   #1
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Rep: Reputation: 30
Unwanted text hightlight in vi


I'm working inside the vi text editor on Red Hat 8.0 at the moment. I don't remember how I did it, only that I tripped over the keyboard as I was typing quickly earlier and I inadvertently caused a word to appear highlighted at each occurrence of the word in the file. For example, when the word "item" appears in the file, it exists inside a tan colored box. All the other words appear against the standard background. I'd like to get rid of this effect. If anyone knows vi well enough to help me with this that would be great. Thanks in advance.
 
Old 12-10-2004, 11:23 AM   #2
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Okay I've found a file in my home directory called ".viminfo" and looking through it I find two lines of interest

#Last Search Pattern:
~Msle0~/\<item\>

So I assume that's the enemy line. I attempt to comment it out using "#" in front of the second line but when I attempt to apply it using "source .viminfo" the terminal is populated with errors and the .viminfo is restored to the way it was before I made the change. I also tried removing both lines completely then logging out and logging back in but the result was the same.

So how do I a) comment, remove the line or 2) in vi some how remove the search pattern for the word "item".

Thanks...
 
Old 12-10-2004, 11:28 AM   #3
raynet11
LQ Newbie
 
Registered: Aug 2003
Location: U.S.A
Distribution: RedHat , Mandrake
Posts: 28

Rep: Reputation: 15
syntax system wide:

1. Open a console window and login as root using the su command
2. Open /etc/vimrc
3. Find the line with "syntax on "
4. place a " in front of the line.
5. save the file.. your set ..
 
Old 12-10-2004, 11:37 AM   #4
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Thanks for your reply. I didn't find the file /etc/vimrc or /etc/.vimrc but I managed to get around this ...Above the two lines I mentioned previously I find the lines:

# hl search on (H) or off (h)
~H

And so I changed that second line to :

~h

which I assumed means "off" and indeed the highlighting effect is gone.

Thanks for your time though.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unwanted folders oscotty General 11 08-28-2005 01:01 PM
Unwanted mail sanjibgupta Linux - General 0 07-08-2004 12:07 AM
Unwanted HD detecting. Nukem Mandriva 14 01-24-2004 11:47 AM
Unwanted shutdown tireseas Linux - Hardware 17 01-02-2004 06:35 PM
emacs hightlight eduac Programming 5 09-08-2003 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration