XYS Syntax Highlighting/Autocomplete for Akelpad [XY v24.60]

Discuss and share scripts and script files...
FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

XYS Syntax Highlighting/Autocomplete for Akelpad [XY v24.60]

Post by FluxTorpedoe »

=================
   xys.coder for Akelpad      XYplorer v24.60 — Updated 2023-07-03
=================


Hi'
Here's a syntax highlighting and autocomplete file for Akelpad:
Akelpad-SyntaxHighlight_XYplorer(v24_60).zip
(23.93 KiB) Downloaded 47 times
   — Unzip the content (the file "xys.coder") in AkelPad\AkelFiles\Plugs\Coder\
   — Check below for Akelpad configuration tips.


Hope this helps, 8)
Flux

Here's a screenshot of the way it looks (with my color definitions).
Sample.png
Sample.png (17.5 KiB) Viewed 13960 times
Sample_Dark.png
Sample_Dark.png (44.17 KiB) Viewed 5003 times

———————————————————————————

######################
### Configuration Tips ###
######################


Here are a few tips for a basic “ideal” configuration of Akelpad for XYplorer:

• Setup:
   1) Copy "xys.coder" in folder "AkelPad\AkelFiles\Plugs\Coder"
   2) Copy your favorite font (e.g. LiberationMono-Regular.ttf / -Bold / -Italic) in "AkelPad\AkelFiles\Plugs\Fonts"
   3) Run Akelpad
   4) In Options | Settings… | Registry > Check "INI file" to make it portable
   5) In Options | Plugins… > Check those entries:
   ------------------------------------
      — Coder::AutoComplete
      — Coder::CodeFold
      — Coder::Highlight
      — …
      — ContextMenu::Main
      — …
      — Fonts::Main
      — …
      — LineBoard::Main
      — …
      — QSearch::QSearch    (which I assigned to Alt+F3)
      — …
      — ToolBar::Main
      — …
      — XBrackets::Main
   ------------------------------------

   6) Restart Akelpad


• Optional:
   #) Adjust your plugin settings in Menu Plugins
   #) Adjust your color theme (Toolbar: 2nd row, 5th button)
   #) To add an XYS entry to the list of Syntax Themes (and/or edit the list):
      — Click on the Syntax Themes button (2nd row, 4th button), which opens a dropdown menu
      — CTRL+Click on "XML", which opens a "ContextMenu plugin" window
      — Insert the following line below the (currently selected) XML entry:
          "XY Script" Call("Coder::Settings", 1, "xys")
   #) To add an XYplorer toolbar button that runs the current (saved) script directly from Akelpad:
      — Copy the following line after editing your XYplorer path (change "XYPath\" to the relative path e.g. "..\XYplorer\", or absolute e.g. "C:\XYplorer\")
          "XYplorer..." Exec('"%a\XYPath\XYplorer.exe" /flg=2 /script="%f"') Icon("%a\XYPath\XYplorer.exe")
      — Right-Click on the toolbar, which opens a "ToolBar plugin" window
      — Paste the copied line at the end of the menu


---------------------------
Last tips contributed by SammaySarkar.

———————————————————————————

• Extras:
— For more information (or alternatives), check this thread: Might as well use syntax highlighting... But where/how?
— For "highlighters" using other editors, you might want to check: List of Scripting Commands and Vars for Syntax Highlighting

———————————————————————————
Attachments
Akelpad-SyntaxHighlight_XYplorer(v22_70).zip
(22.27 KiB) Downloaded 173 times
Akelpad-SyntaxHighlight_XYplorer(v17_40).zip
(17.37 KiB) Downloaded 380 times
Last edited by FluxTorpedoe on 03 Jul 2023 16:15, edited 33 times in total.

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: XYS syntax highlighting for Akelpad [XY v13.90]

Post by Enternal »

Thank you Flux! This is really sweet! Akelpad and Notepad2-mod are my favorite light weight editors so this addition for the coloring scheme is awesome! Edit script on the go!

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: XYS syntax highlighting for Akelpad [XY v13.90]

Post by FluxTorpedoe »

Yep, I really like Akelpad speed and snappiness!

- - - - - - - - -

Bonus — Font used: Liberation Mono

While I edited the previous post to add a screenshot, I remembered a discussion about "coding" fonts (If I find the original thread, I'll update it).
A few months ago, I tested pretty much all the mono fonts I could find and settled on "Liberation Mono" (I recommend v2.00.1), which is the best/only one that I found always readable with clear distinctions between 0/O, 1/l —and that, whatever the size—, commented (italic) pipes | that do not transform into slashes /, etc.
And best of all: it's free!

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: XYS syntax highlighting for Akelpad [XY v13.90]

Post by Enternal »

Oh! That's interesting! My favorite font have always been Lucida Console but this looks really good too! Thanks!

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v14

Post by FluxTorpedoe »

Updated to XYplorer v14.40 (see first post).

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v14

Post by bdeshi »

Great! :appl:







-------------
The autocompleted comments can become a nuisance though. (No offense!)
So I added a copy of the SC's, minus comments, at the end of `Block:`. (Using regex \$\[\/\/.+\]$ on the copied textblock)
So now the first autocomplete entry for each SC is commentless, and when I need some help, the second entry has that!
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v14

Post by FluxTorpedoe »

Thanks. :)

BTW, cool idea about the "opting-out" of comments! Nice for preserving the health of the TAB key... 8)

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: XYS Syntax Highlighting/Autocomplete for Akelpad [XY v15

Post by FluxTorpedoe »

Updated to XYplorer v15.30 (see first post).

Plus:
— added a few missing undocumented commands —only if usable in scripts though— (thanks to highend post!).
— added {Undocumented} at the end of comments of all undocumented commands (I realized I had a tendency to take some of them for granted…). Anyway you can still get rid of the comments as to SammaySarkar's tip above.

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: XYS Syntax Highlighting/Autocomp. for Akelpad [XY v15.30

Post by FluxTorpedoe »

Thanks for the feedback SammaySarkar (which seems to have disappeared!). :)

Re:
Wowwow functions() !!! It's not in the help so my command extractor missed it —as have I, being off-line for far too long it seems! ;)

Greaaat addition to XY scripting indeed!

So here's a revised version, containing also function, namespace, include, and include_once.
I also took care to give user functions() the same color as regular functions.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: XYS Syntax Highlighting/Autocomp. for Akelpad [XY v15.30

Post by bdeshi »

:tup:
my command extractor missed it —as have I, being off-line for far too long it seems! ;)
you might consider put it in github (like binocular's SublimeText syntax), so others can pester you with updates! :kidding:



"Thanks for the feedback SammaySarkar (which seems to have disappeared!). " - Heh, yeah I deleted it, because it sounded too nitpicky. : whistle :
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: XYS Syntax Highlighting/Autocomp. for Akelpad [XY v15.30

Post by bdeshi »

hey, a small bug: in a string like this "test()", the inner text is hilited as a function.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: XYS Syntax Highlighting/Autocomp. for Akelpad [XY v15.30

Post by klownboy »

Thanks for the update Flux. It was the push I needed to associate xys files to AkelPad. I had it installed along with you previous XYS syntax highlighting file but was still using NotePad++.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: XYS Syntax Highlighting/Autocomp. for Akelpad [XY v15.30

Post by highend »

It was the push I needed to associate xys files to AkelPad
So Akelpad is superior over Notepad++? Never used any of them :/
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: XYS Syntax Highlighting/Autocomp. for Akelpad [XY v15.30

Post by klownboy »

highend wrote:So Akelpad is superior over Notepad++? Never used any of them :/
Hey highend, no not necessarily. Along with PSpad, I've had both on the computer for a while. I've been mostly using NotePad++ and haven't used either PSpad or AkelPad so much, so time will tell. Both are free and will highlight like words and have end of line and space markers, etc. I'm not sure yet if AkelPad is as powerful, but as with NotePad++, there are plenty of add-ons and I do like Flux's syntax highlighting coder file.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: XYS Syntax Highlighting/Autocomp. for Akelpad [XY v15.30

Post by bdeshi »

AkelPad is very fast, but quit advanced too.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply