Asterisk UDL for Notepad ++

General discussions about Asterisk.

Moderators: Moderator, Support

Asterisk UDL for Notepad ++

Postby phonefxg » Sun Dec 07, 2014 11:20 am

I'm using asterisk quite a lot with notepad ++ combined with Winscp.
I could not find any good user defined language for color coding and basic autocomplete.
I decided to make my own and share it .

http://goo.gl/tLrebd

What you get with this Asterisk 11 UDL:

1- Applications keywords in BLUE
2- Functions keywords in RED
3- All built-in variables in PURPLE
4- Comments in GREEN
5- Configuration file settings name in PINK
6- Context,Macro,Subroutines in ORANGE
7- Pattern matching in RED
8- Short description on all Functions and Applications
9- Jump to context,macro,subroutines (View--->Function Lists in Notepad ++)

You can add notepad ++ as the preferred editor in the Winscp option.


Image

Image

Image


Here's the basic steps to install it in Notepad ++:

1- Import the asterisk.xml into notepad ++ by going into language-->define your language and click on import.

2- (Optional) for functions list to work, you have to mofify the file functionList.xml
in the notepad ++ directory and add this part:

Code: Select all
<association userDefinedLangName="asterisk" id="my_asterisk_passer_id"/>


Code: Select all
<parser id="my_asterisk_passer_id" displayName="asterisk" commentExpr="&lt;!--([^-]|-(?!-&gt;))*--&gt;">
            <!-- Only match nodes with at least one attribute -->
            <function
                mainExpr="^\[(.*?)\]"
               displayMode="$functionName">
               <functionName>
                  <nameExpr expr="^\[(.*?)\]"/>
               </functionName>
            </function>
         </parser>
phonefxg
Oldsterisk
 
Posts: 59
Joined: Fri Mar 21, 2014 11:04 am

Re: Asterisk UDL for Notepad ++

Postby ami_mac » Mon Dec 15, 2014 1:38 pm

Thanks for this!
ami_mac
Newsterisk
 
Posts: 4
Joined: Thu Aug 21, 2014 10:33 pm

Asterisk UDL for Notepad ++ Version 13 PJSIP

Postby phonefxg » Sun Oct 04, 2015 5:57 am

Here's the new UDL for Asterisk version 13 and the new pjsip driver. I have been using it for a few months now.
Attention : Configuration file settings are for the pjsip driver so chansip settings will not appear in pink in pjsip.conf.

http://goo.gl/ZSQQf6


Here's the basic steps to install it in Notepad ++:

1- Import the Asterisk_13_UDL.xml into notepad ++ by going into language-->define your language and click on import.

2- Copy Asterisk.xml into the \plugins\APIs of notepad ++.

3- Modify the file functionList.xml or download mine and put it in the right directory.
You will have to modify it in %APPDATA%\notepad++\ if installed or in Notepad++ installed directory if using a zip package or portable version.



Code: Select all
<association userDefinedLangName="asterisk" id="my_asterisk_passer_id"/>



<parser id="my_asterisk_passer_id" displayName="asterisk" commentExpr="&lt;!--([^-]|-(?!-&gt;))*--&gt;">
            <!-- Only match nodes with at least one attribute -->
            <function
                mainExpr="^\[(.*?)\]"
               displayMode="$functionName">
               <functionName>
                  <nameExpr expr="^\[(.*?)\]"/>
               </functionName>
            </function>
</parser>
phonefxg
Oldsterisk
 
Posts: 59
Joined: Fri Mar 21, 2014 11:04 am


Return to Asterisk General

Who is online

Users browsing this forum: Google [Bot] and 1 guest