LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Getting rid of highlighting in a vi editor text file. (https://www.linuxquestions.org/questions/linux-newbie-8/getting-rid-of-highlighting-in-a-vi-editor-text-file-155982/)

Dee62 03-10-2004 03:57 PM

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?

Mega Man X 03-10-2004 04:02 PM

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!

Genesee 03-10-2004 04:10 PM

http://www.linuxdocs.org/HOWTOs/Vim-...1.html#ss11.18

Dee62 03-10-2004 04:11 PM

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.

Mega Man X 03-10-2004 04:20 PM

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 :)

Qzukk 03-10-2004 11:54 PM

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 ;)

Dee62 03-11-2004 02:55 PM

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. :)


All times are GMT -5. The time now is 12:27 PM.