LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-12-2012, 08:11 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
Turn off yellow highlighting in vi


On one of my servers, every time I go to vi my smb.conf, there's a pattern of numbers that is always highlighted yellow. Assuming somehow I did a search or something by accident, but every time i go into this file, those numbers are always highlighted yellow now. How can i turn that off?
 
Old 07-12-2012, 08:21 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
I'm sure there's a more "correct" way, but usually I just do a search for jibberish to turn that off. Forward slash to search, then type in something like "hdgwvohdbshfi". It'll say there were no matches, then the highlighting will be gone.
 
1 members found this post helpful.
Old 07-12-2012, 08:29 AM   #3
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
"correct" or not, that worked! that was driving me nuts haha. I wonder what the "correct" way is, maybe I won't mark this as solved quite yet to see if anyone else chimes in with that. Thanks eggroll.
 
Old 07-12-2012, 09:25 AM   #4
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
the correct way to turn it off is ":nohl" and it stands for no highlight
 
1 members found this post helpful.
Old 07-12-2012, 09:47 AM   #5
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Thanks. Any idea why that would get stuck on inside the file though for that search? Also, whats the shortcut to turn that on? Just trying to understand, and figure out what I accidentally typed to get it to stick like that.
 
Old 07-12-2012, 09:51 AM   #6
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
when you search for something like "/test" in a file it will highlight when it finds it. you are using VIM and it keeps history and persists things between usages.
another example of the setting saved is if you open a long file and scroll to the middle of the file then close and reopen it should put you back in the same position. based on the .vimrc in your home directory decides what persists through the sessions.
 
2 members found this post helpful.
Old 07-12-2012, 10:02 AM   #7
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi all

I use references from here to play with the settings
and from here where you can enable/disable Last known cursor position.
 
1 members found this post helpful.
Old 07-12-2012, 10:20 AM   #8
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Cool, thanks for all the help everyone. Think i'm all set now.
 
Old 07-12-2012, 10:54 AM   #9
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
well,
here's a lot more of VIM configurations.
 
  


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
I hear I can turn my Sony Ply stn 3 into a mini supercomputer with Linux Yellow Dog? mixhypnatist Linux - Software 7 01-21-2011 01:21 PM
How do I turn off the Yellow Dog Linux 6.2 screen saver? Psychokillaz Linux - General 5 06-11-2010 08:24 PM
My CnMBook Manual page 5 shows how to turn off on desk top, but how do I turn on? salmagundi Linux - Newbie 2 04-04-2009 02:46 PM
How to start, stop, turn on, and turn off deamons BuckRogers01 Debian 3 08-16-2005 09:39 AM
How to turn off Xserver in the gui and turn it off in the command line geminiviper Linux - Newbie 8 08-20-2004 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:53 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
Open Source Consulting | Domain Registration