LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 03-10-2004, 04:57 PM   #1
Dee62
LQ Newbie
 
Registered: Mar 2004
Location: London ON Canada
Posts: 4

Rep: Reputation: 0
Question Getting rid of highlighting in a vi editor text file.


I am just learning Red Hat 9 Linux. Today in class we learned how to highlight text by using the command /Mother. When the lesson was over no one really knew how to get rid of the highlighting of Mother so that the text was all normal again. Any hints or knowledge of how to get rid of it?
 
Old 03-10-2004, 05:02 PM   #2
Mega Man X
Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 63
Hi Dee62!

Welcome to LinuxQuestions.org. To enable vim syntax highlighting do, while editing a file:

ESC: syntax on

To disable it:

ESC: syntax off

I don't know if that would work with Mother (nor have I heard of that command). But try it out.

Cheers!
 
Old 03-10-2004, 05:10 PM   #3
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
http://www.linuxdocs.org/HOWTOs/Vim-...1.html#ss11.18
 
Old 03-10-2004, 05:11 PM   #4
Dee62
LQ Newbie
 
Registered: Mar 2004
Location: London ON Canada
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you megaman X. I will try that and let you know. it is the command that finds the next occurence of the word Mother in the file and highlights it but don't know how to turn it off.
 
Old 03-10-2004, 05:20 PM   #5
Mega Man X
Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 63
Quote:
Originally posted by Dee62
Thank you megaman X. I will try that and let you know. it is the command that finds the next occurence of the word Mother in the file and highlights it but don't know how to turn it off.
Thanks mate!. Cool, I will check it out. We learn something new everyday here
 
Old 03-11-2004, 12:54 AM   #6
Qzukk
Member
 
Registered: Jun 2003
Posts: 132

Rep: Reputation: 15
The highlighting is enabled throgh ":set hlsearch" and disabled through ":set nohlsearch". Personally when I'm too busy to type that, I just type /asfijaelkfe so it goes away
 
Old 03-11-2004, 03:55 PM   #7
Dee62
LQ Newbie
 
Registered: Mar 2004
Location: London ON Canada
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry Megaman X...it didn't work. Nothing happened when I tried your idea.
Thanks Qzukk. I found out that :noh works faster than typing all that and the :set nohlsearch can be set in the .erxc file(ex runtime configuration) in the home directory. Thank you for your help.
 
  


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
Actionscript editor or syntax highlighting? lhoff Linux - Software 2 06-23-2008 01:11 PM
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 12:28 PM
gui, non-kde, non-gnome text editor & file manager jaakkop Linux - Software 2 07-26-2005 12:09 AM
need editor with syntax highlighting & ftp YBA^[x] Linux - Software 5 12-16-2004 05:29 PM
full screen TEXT UI editor, file manager? sick-o-windoze Linux - Newbie 6 12-01-2003 02:47 PM


All times are GMT -5. The time now is 07:19 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration