Code colors in my config files?


I setup an asterisk and when im in extensions.conf or wherever it shows my code in different colors to show me if i made an error. I like that.

I setup another one that was A@H and it is just black and white all the time. How do I get it to show the colors, I have searched all over google…

That sort of functionality is almost certainly associated with the editor you’re using to create the files.

Many code editors are designed to notice code groups (like if statements, and opened, but not closed sets of parenthesis).

This isn’t something that’s built into Asterisk. Look up Linux text editors and their features to find one that groups code by color.

Also, make sure that your environment is correctly set. You can’t see color if your TERM environment variable isn’t setup to be a color terminal type.

thanks, i assume i had plain vi installed, i installed vim 7.0 and got it working amazingly some how (first thing ive complied and made in linux)

it is black and white too, so Im guessing the TERM thing is my problem…can u give me a little guidance on how to check and fix that im getting sooo close i think

holy hell i figured it out.

vim a file:
vim /etc/asterisk/extensions.conf

once thier get to the command thing with ":"
then type “syntax enable”