PSPad Syntax Highlighting

Discuss and share scripts and script files...
binocular222
Posts: 1416
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Re: PSPad Syntax Highlighting

Post by binocular222 »

I use Consolas
Thick strokes help my eyes
It's mono-spaced too
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: PSPad Syntax Highlighting

Post by PeterH »

binocular222 wrote:I use Consolas
Thick strokes help my eyes
It's mono-spaced too
Thanks for this!

But: oh dear! For a comparable width I need Consolas 11. Big difference to 10 - also in means of bold text: with Consolas 10 it's rather weak, with 11 very good. The problem then: the rather reduced number of lines per window. (40/44/58 lines for Consolas 11/Courier New 10/Lucida Console 9, at identical width.)

As I love to see many lines of code in one window, and contrast for bold is good, I'll prefer Lucida Console 9 for now. But might be a matter of change after some time...
W7(x64) SP1 German
( +WXP SP3 )

RalphM
Posts: 1932
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: PSPad Syntax Highlighting

Post by RalphM »

I have updated the language definition files for PSPad to reflect the changes made in XY's scripting engine up to v17.00.0000.

Attached is a zip with the current files.
Attachments
PSPad_XYScript_language_files_v17.00.0000.zip
(9.15 KiB) Downloaded 146 times
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

RalphM
Posts: 1932
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: PSPad Syntax Highlighting

Post by RalphM »

I have updated the language definition files for PSPad to reflect the changes made in XY's scripting engine up to v19.30.0000.

Below is a zip archive with the current files.
PSPad_XYScript_language_files_v19.30.0000.zip
(10.04 KiB) Downloaded 136 times
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: PSPad Syntax Highlighting

Post by PeterH »

Thanks a lot!

:tup: :beer: :om:
W7(x64) SP1 German
( +WXP SP3 )

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: PSPad Syntax Highlighting

Post by PeterH »

I'm working on new PSPad definitions for XY.
In the moment: colorization, i.e. the .ini
Having difficulties... :(

Someone interested to talk about???

No Problem with [KeyWords] Section,
but PROBLEMS with [ReservedWords]

I'm on to DELETE ALL in [ReservedWords] (but "Not", "Like" etc.)
Some Reasons:
- don't understad the group <%xxx%> defs - what is the <...> standing for?
- they might be %...% - but that requires "%" to be in KeyWordChars - leading NOT to recognize % as a separator. (e.g. $x=$a%$b;)
- ABSOLUTELY no Space is allowed in any keyword - so all <get xxx> seem to not make any sense at all
- to define at least e.g. <date> would req < and > in KeyWordChars -> problems for < > as compare etc.

:arrow: OK: that's *MY* current understanding of what could and should be done.
==> I would be glad about any opinion to this
W7(x64) SP1 German
( +WXP SP3 )

RalphM
Posts: 1932
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: PSPad Syntax Highlighting

Post by RalphM »

Hi PeterH

When I first started to do the custom highlighter for PSPad I tried to find some documentation on the process and meaning of the different sections in the .def and .ini files but wasn't very successful so I just kept building on the original first version of jfeist (I don't even recall where I found that version but probably on the PSPad forum). I kept updating it for the few fellow XY users out there that still seemed to use it (you obviously being one of them) while my own usage of it has declined considerably due to less need for XY scripting on my end in recent years.
So, if you come up with a better version I'm happy to let you take the reigns on this small project.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: PSPad Syntax Highlighting

Post by PeterH »

Hallo Ralph,
Response from the other side of the world :-)

You are right with "find some documentation" - that's a big part of my problem, too. Often you simply must test...
...and I must say: the syntax of XY doesn't really fit the abilities of PSPad highlighting :cry:

So I think I'll continue with updating the definitions to the current XY version, while reducing the (often non-working) definitions, especially deleting *all* those containing "<", ">" and "%". Though I don't really like it, it seems there are more advantages than disadvantages.

So after some days I expect to publish the .INI for colorization. The .DEF for clips will need quite some days more - but as I see it they are independent.

So when I'm done you may have a look, and if you see problems or have some ideas: don't hesitate to contact me!

Have a nice day!
Peter
W7(x64) SP1 German
( +WXP SP3 )

Post Reply