Hi Flux,
pleased you liked my suggestion.
Same idea to highlight function name :
QuotesRE:
;==========================================================================
;Flags Pattern \BackRef=(FontStyle,ColorText,ColorBk) \BackRef=...
;==========================================================================
0 "(function)\s+(.+$)" "\1=(0,${IF},0) \2=(2,0,#0000FF)"
Bonne journée.
XYS Syntax Highlighting/Autocomplete for Akelpad [XY v26.40]
Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v25.90]
ReHi,
better RegExp to isolate function name :
better RegExp to isolate function name :
0 "(function)\s+(.+\))\s+\{$" "\1=(0,${IF},0) \2=(2,0,#0000FF)"
Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v25.90]
A little script to help decode highlight "flags values"
Copy + paste in a .js file under AkelPad\AkelFiles\Plugs\Scripts
Useful for me, maybe for you ?
Copy + paste in a .js file under AkelPad\AkelFiles\Plugs\Scripts
Useful for me, maybe for you ?
Code: Select all
// Select flag value and call script.
var pSelText=AkelPad.GetSelText();
var nResult=0;
var flag=[];
flag[1] = "case sensitive";
flag[2] = "word is a composition of chars";
flag[4] = "QE required";
flag[8] = "QS is ignored, use last met delimiter as QS";
flag[16] = "QE is ignored, use first met delimiter as QE";
flag[32] = "don't highlight QS";
flag[64] = "don't highlight QE";
flag[128] = "don't catch and don't highlight QS";
flag[256] = "don't catch and don't highlight QE";
flag[512] = "QS, delimiter or word is at line start";
flag[1024] = "QE, delimiter or word is at line end";
flag[2048] = "QS is surrounded with delimiters";
flag[4096] = "QE is surrounded with delimiters";
flag[8192] = "quote doesn't contain delimiters";
flag[16384] = "only QS string is catched";
if (pSelText) {
nResult=DeSum(pSelText);
WScript.Echo("[ QS/QE : Quote Start/End ]\n\n"+pSelText + " (sum of)" + nResult);
}
else {
WScript.Echo("No value selected !");
}
function DeSum(value) {
var b=1;
var res=[];
while (b<=value) {
if (b&value) res.push("\n"+b+"\t : "+flag[b]);
b<<=1;
}
return res;
}
-
- Posts: 900
- Joined: 05 Oct 2011 13:15
Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v25.90]
@Horst
Thanks for the feedback, it’s always welcome!
@ren
Interesting script for Akelpad, thanks!
Also, the highlight for function declarations could be a nice touch too (even though less useful in my case, I declare them at the bottom of my scripts).
@all
To make the new highlight for script captions more customizable, I tried to use theme variables instead of fixed colors, but obviously it depends on everyone’s theme. I may set it as default in the next update, so tell me if that would work for you.
Replace the active caption highlight after "; Quotes",
Default:
with this:
Thanks for the feedback, it’s always welcome!
@ren
Interesting script for Akelpad, thanks!
Also, the highlight for function declarations could be a nice touch too (even though less useful in my case, I declare them at the bottom of my scripts).
@all
To make the new highlight for script captions more customizable, I tried to use theme variables instead of fixed colors, but obviously it depends on everyone’s theme. I may set it as default in the next update, so tell me if that would work for you.
Replace the active caption highlight after "; Quotes",
Default:
Code: Select all
517 1 #FFF #40639A `"` `"` "" "" "-"
Code: Select all
517 1 ${HighLight_CaretColor} ${ATTR} `"` `"` "" "" ""
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...

-
- Posts: 30
- Joined: 20 May 2015 16:18
Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v25.90]
I cannot seem to get the Toolbar Button to execute an XYS script to work.
The path to my XYPlorer executable is: "C:\Program Files (x86)\XYplorer"
So, the line that I added to the Toolbar editor is:
"XYplorer..." Exec('"%a\C:\Program Files (x86)\XYplorer\XYplorer.exe" /flg=2 /script="%f"') Icon("%a\C:\Program Files (x86)\XYplorer\XYplorer.exe")
What am I doing wrong here?
Thanks for your help!
-Jim
The path to my XYPlorer executable is: "C:\Program Files (x86)\XYplorer"
So, the line that I added to the Toolbar editor is:
"XYplorer..." Exec('"%a\C:\Program Files (x86)\XYplorer\XYplorer.exe" /flg=2 /script="%f"') Icon("%a\C:\Program Files (x86)\XYplorer\XYplorer.exe")
What am I doing wrong here?
Thanks for your help!
-Jim
-
- Posts: 900
- Joined: 05 Oct 2011 13:15
Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v25.90]
HI,
Goodness gracious me
It took me a while to figure it out, but the answer is simple: the first post is incorrect!
"%a" stands for "Akelpad directory": I use XYplorer as a portable package with some essential programs in sub or near folders, so all my paths are relative in general, and my line uses "%a\..\..\..\XYplorer.exe".
Just remove the %a\ and you should be fine and dandy.
Have a nice day,
Flux
Goodness gracious me
It took me a while to figure it out, but the answer is simple: the first post is incorrect!
"%a" stands for "Akelpad directory": I use XYplorer as a portable package with some essential programs in sub or near folders, so all my paths are relative in general, and my line uses "%a\..\..\..\XYplorer.exe".
Just remove the %a\ and you should be fine and dandy.
Code: Select all
"XYplorer..." Exec('"C:\Program Files (x86)\XYplorer\XYplorer.exe" /flg=2 /script="%f"') Icon("C:\Program Files (x86)\XYplorer\XYplorer.exe")
Flux
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...

-
- Posts: 30
- Joined: 20 May 2015 16:18
Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v25.90]
Thank you, Flux! And thank you so much for this XYS Lexer....I am really just learning to script in XYS, but I can tell that this is going to be very useful. I guess my first question should have been, what is the '%a'?, cause I really had no idea what it was for.
I knew that your revised line was gonna work when I saw the XYPlorer icon appear immediately on the menu bar....that made me a happy panda!
Thanks again
I knew that your revised line was gonna work when I saw the XYPlorer icon appear immediately on the menu bar....that made me a happy panda!
Thanks again
-
- Posts: 900
- Joined: 05 Oct 2011 13:15
Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v26.40]
Hi everyone,
I just updated the file to XYplorer v26.40 (link to file and configuration tips available in first post).
— ⚠ This is a notable update (163 differences) —
Features:
— Changes from 25.90
— Updated and added LOTS of extra info (flags, modes, etc.), especially for complex commands (get(), rename, tab(), view()...)
— Changed highlighting of script labels (main entries, and after load and sub), now colored based on theme
Note: I tried to set the colors to the elements that work best (more or less) with all defaults themes, either light or dark
— Added highlighting of function declaration names (also based on theme)
Note: By default, only function name is highlighted.
To highlight it also with parentheses, or to highlight full declaration, (un)comment the desired setting after "QuotesRE:"
— Lots of small fixes
Have a nice day,
Flux
I just updated the file to XYplorer v26.40 (link to file and configuration tips available in first post).
— ⚠ This is a notable update (163 differences) —
Features:
— Changes from 25.90
— Updated and added LOTS of extra info (flags, modes, etc.), especially for complex commands (get(), rename, tab(), view()...)
— Changed highlighting of script labels (main entries, and after load and sub), now colored based on theme
Note: I tried to set the colors to the elements that work best (more or less) with all defaults themes, either light or dark
— Added highlighting of function declaration names (also based on theme)
Note: By default, only function name is highlighted.
To highlight it also with parentheses, or to highlight full declaration, (un)comment the desired setting after "QuotesRE:"
— Lots of small fixes
Have a nice day,

Flux
• Scripts: Session Manager
| SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...

Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v26.40]
Thanks for making this useful tool even more useful.