Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Some .conf files have a lot of comments and parameters in them like so,

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
.....

It gets difficult to look for only the parameters among the plethora of comments, so is there some text editor that can highlight the comments in dark grey so that the real parameters stand out?

share|improve this question
    
Just to be sure. Do you want to open the conf file via a GUI like kate or gedit or do you want to do it in terminal like nano, vim, pico, etc..? –  Luis Alvarado Dec 31 '10 at 3:47
    
Yes, in a GUI editor.. –  Zabba Dec 31 '10 at 5:43

1 Answer 1

up vote 4 down vote accepted

Emacs does automatic syntax highlighting for .conf files. It's possible you won't like (I don't!) its colors for .conf files, so check http://stackoverflow.com/questions/1076503/change-emacs-syntax-highlighting-colors and you'll be able to change it to your tastes. And it can do it the same way with a GUI or in console mode.

GEdit also does it, but not automatically. Manually set the highlighter (click on "Plain Text" on the status bar, or through View > Highlighter) to awk or sh, and you'll have a similar effect.

I'm just suggesting these two. There are many other editors that will do what you want.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.