Results 1 to 3 of 3
Hey guys, I am new here and looking to get more familiar with Linux. I recently decided to study c programming, and I am using the vi editor under Redhat. ...
- 04-11-2010 #1
[SOLVED] my vi settings are messed up! HELP
Hey guys, I am new here and looking to get more familiar with Linux. I recently decided to study c programming, and I am using the vi editor under Redhat. But the other day I did a fat finger at my #include header file in the vi editor and now all words "include" are all highlighted blue; if i type in another include as soon as I finish the word it automatically highlights blue. How can I undo this?
Thanks for any help!
- 04-11-2010 #2
You may have pressed the '*' key. '*' means to search for all occurrences of the word currently under the cursor.
There is a setting in vi called hlsearch that causes all occurrences of a word that is being searched for to highlight, so that they're easy to find. To turn it off is simple, just run the command:
Note that the next time you run a search, the words will highlight again, and you will have to run :set nohl to turn it off again. To prevent words from ever highlighting, you can run the command:Code::set nohl
Code::set highlight clear Search
DISTRO=Arch
Registered Linux User #388732
- 04-11-2010 #3
Thanks for the help, you put me right on track! Now I can focus on c programming again.
I guess commands vary a bit from distro or version? since I had to use:
Code:: noh
Thanks again!


