[asterisk-users] Which KDE editor to edit Asterisk config files ?
Diego Iastrubni
diego.iastrubni at xorcom.com
Thu May 17 05:28:11 MST 2007
Well, this KDE user (if I have a working SVN account do I qualify as a KDE
developer...?) uses only kate and hates VIM. I
use "sftp://root:12345@mymachine/etc/asterisk/*.conf" to open files on the
remote servers.
Ok, so instead of bitching, I am attaching here my first draft of the XML file
which represents the kate syntax hightlighing. Save in in
~/.kde/share/katepart/diego-kicks-ass.xml, and you will see "Asterisk config
files" under "Configuration".
It's not done yet, as I want the sample configuration file (also attached
here) to be working as expected.
Please comment and review.
PS:
Someone said something about bluefish. This is a GtkSourceView syntax
highlighter which will work on GEdit as well no...? Can you share?
On Wednesday 16 May 2007 19:57, Andrew Kohlsmith wrote:
> On Wednesday 16 May 2007 11:47 am, Olivier wrote:
> > Do you mean nobody has ever done this before (as I thought before asking
> > this question to the list) ?
> > So which tool KDE users are using for this ?
>
> I am a KDE user, although on Slackware. Have been for many, many years.
>
> Typically you will find that those who wish to use their GUIs to manipulate
> Asterisk will do so through one of the available GUIs. Those who want to
> work on the text files will use vim or emacs.
>
> I develop embedded systems; I use kdevelop for coding for the most part,
> and once in a while I'll use Kate to edit config files, but 99% of my time
> manipulating text files is done in vim.
>
> Even as I type this I have kdevelop open for the source and html, but I
> have three konsole tabs open: one to a screen session to a server I IRC
> from, one to a screen session to my development box in the server room
> (which has two login sessions going), one to a telnet session to the board
> I'm developing for, and finally one to a serial port server which the
> serial console of the development box is connected to.
>
> Kate's open, but contains a little textfile I append to which has todo
> lists and notes for the development project.
-------------- next part --------------
; comment
; illegal content: not inside a context
include => context1
exten => s,1,Answer
illegal syntax
#include another_file
#include *more_files
[context1] ; a comment
exten => s,1,Answer ; more comments
exten => s,2,Hungup ; and even more
[context2]
exten ;; should be an error
exten -> ;; should be an error
exten -> s ;; should be an error
exten -> s,n ;; should be an error
[context3] shuold be an error
include => context2 ; ok
include => "context2" ; ok, but fishie
[context3] shuold be an error ; and this a comment
include => context2 ; ok
include => "context2" ; ok, but fishie
-------------- next part --------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Asterisk config files" version="1.00" kateversion="2.4" section="Configuration" extensions="*.conf" author="Diego Iastrubni (elcuco at kde.org)" license="Public Domain" >
<highlighting>
<list name="dialplan_keywords">
<item> exten </item>
<item> include </item>
</list>
<contexts>
<context name="normal" attribute="Error" lineEndContext="#stay" firstNonSpace="1">
<DetectChar char=";" context="comment" firstNonSpace="1" />
<DetectChar char="[" context="context" firstNonSpace="1" />
<DetectChar char="#" context="include" firstNonSpace="1" />
<keyword String="dialplan_keywords" context = "diaplan_context" firstNonSpace="1" />
</context>
<context name="context" attribute="Context" lineEndContext="#pop" >
<DetectChar char="]" context="normal" firstNonSpace="1" />
<!-- <DetectChar context="comment" char=";" /> -->
</context>
<context name="include" attribute="Include" lineEndContext="#pop">
<DetectChar context="comment" char=";" />
</context>
<context name="include_context" attribute="IncludeDial" lineEndContext="#pop">
<DetectChar context="comment" char=";" />
</context>
<context name="diaplan_context" attribute="Normal" lineEndContext="#pop">
<DetectChar context="comment" char=";" />
</context>
<context name="error" attribute="Error" lineEndContext="normal" >
</context>
<context name="comment" attribute="Comment" lineEndContext="#pop" >
</context>
</contexts>
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Context" defStyleNum="dsFunction" />
<itemData name="Include" defStyleNum="dsOthers" />
<itemData name="IncludeDial" defStyleNum="dsError" />
<itemData name="Error" defStyleNum="dsError" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start=";" />
</comments>
<keywords casesensitive="1"/>
</general>
</language>
More information about the asterisk-users
mailing list