LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-30-2003, 01:48 PM   #1
vinfekshen
LQ Newbie
 
Registered: Oct 2003
Posts: 2

Rep: Reputation: 0
Question can't get rid of highlighted items in vi


I am starting to play with the wonderful vi editor and have gotten stuck...while making a new file, I was trying to put comments in by using a # sign but didn't realize I was in command mode. When I pressed # it did like a search or find command and highlighted the first /directory/ it could find. And now any file I open with vi, if there is a line with /directory/ in it, it will highlight it. How can I make the highlights go away?
 
Old 10-30-2003, 02:03 PM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
search fo something that isn't common...
example:
vi whatever
esc to go in command mode
/thereisnowaythisexists

It's lame and I'm sure there is another way around it but it won't highlight whatever you searched for last...
 
Old 10-30-2003, 02:07 PM   #3
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
I think
:set nohlt
will turn off highlighting. Something similar.

:set hlt
will turn it back on again.
 
Old 10-30-2003, 04:12 PM   #4
evil_Tak
Member
 
Registered: Oct 2003
Distribution: Debian/unstable
Posts: 85

Rep: Reputation: 15
:help highlight ?
 
Old 10-30-2003, 08:26 PM   #5
vinfekshen
LQ Newbie
 
Registered: Oct 2003
Posts: 2

Original Poster
Rep: Reputation: 0
thank you guyz - I used the first suggestion and vi did a search without any match - resulting in removing the highlighted search items!


--2 wrongz never make a right, but 3 do!--
 
Old 10-31-2003, 06:21 AM   #6
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
But seriously, isn't there any way to tell VI you've completed the search?

I find it a bit weird that an editor requires me to type /dsfsdfsd while it's other commands are so short and fast in their use
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
All messages are highlighted in Kopete! Bjorne Linux - Software 2 08-18-2005 06:31 AM
Corrupt file, highlighted in red BPT73 Linux - Newbie 2 05-06-2005 08:30 PM
Desktop items johnnydangerous Fedora 2 03-05-2005 10:34 AM
/lib/modules/2.4.20-6/ contains an entry called "build" which is highlighted in red - Simon Bridge Linux - Software 1 01-24-2004 10:46 PM
Highlighted text in Vi doncrawley Linux - Newbie 3 10-18-2003 09:37 AM


All times are GMT -5. The time now is 08:43 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration