* Updated August 19, 2006 -- My joerc and asterisk.jsf files have been added to this page as TEXT for those who prefer.
-------------------------------------------------------------------------------------------------------------------------------

Feedback is welcome (reasonable feedback) as are your updates and improvements. Send to andrewp@thenorth.com

I've no idea how many old programmers like me still use "joe" (Joe's Own Editor) to edit their Asterisk .conf files while in an SSH session and a bash shell, but for both of you out there who do, I've crafted a syntax file for managing these files. I've set it up to color the comments, hightlight blocks, mark variables, and emphasis separators.

I've not tried to make this comprehensive -- I did compile a keyword list but haven't (and probably won't) set it up to be fully keyword syntax aware. The nature of the language is such that I don't see it as necessary. I also use the comma, equals, =>, parens, and curly braces in mine. I realize many people use pipe symbols or other things --- but I did this for me.

You're welcome to use mine, extend it, make it yours, republish it with or without credit, make a more complete or correct version, or just point me to another one out there that's better.

As distributed, here's what it looks like in my extensions.conf file -- with a few things blurred out for privacy.



To add this to you own configuration for "joe" (Joe's Own Editor):

1. Edit your /etc/joe/joerc file and add these lines, so that this syntax is used for .conf files. This should be reasonably compatible with other .conf files on your system. You could do other things like use ;!AST as the first line of all your asterisk conf files and identify not by *.conf but rather syntax which looks for the identifier, but why bother. It goes somewhere in the second section of that file --you'll see many similar entries.
 
ASTERISK
*.conf
-autoindent
-syntax asterisk 

2. Drop this file (below) as "/etc/joe/syntax/asterisk.jsf"
 
asterisk.jsf 
 
joerc 

3. Note the security settings on the files should be sufficient that ANYONE can read them.


Feedback is welcome (reasonable feedback) as are your updates and improvements. Send to andrewp@thenorth.com

Show details for This is my '/etc/joe/joerc' file...This is my '/etc/joe/joerc' file...

Show details for This is my '/etc/joe/syntax/asterisk.jsf' file...This is my '/etc/joe/syntax/asterisk.jsf' file...