You are here: PSPad forum > English discussion forum > Doubt about sintax highlighting

Doubt about sintax highlighting

#1 Doubt about sintax highlighting

Posted by: northwest | Date: 2022-10-20 21:27 | IP: IP Logged

Hi, i'm migrating from another text editor to Pspad and i like to know if it is possible configure Pspad this way:

My current text editor is configured to highlight some keywords in red but only when keyword is followed by a space, is it possible to configure Pspad highlighting to do the same ?, thank you very much.

Options: Reply | Quote | Up ^


#2 Re: Doubt about sintax highlighting

Posted by: pspad | Date: 2022-10-21 02:26 | IP: IP Logged

Hello
Keyword is red folklowed by space and different color followed by what?

Options: Reply | Quote | Up ^


#3 Re: Doubt about sintax highlighting

Posted by: northwest | Date: 2022-10-21 03:49 | IP: IP Logged

pspad:
Keyword is red folklowed by space and different color followed by what?

Thank you for answering, i'll give you an example of my current highlight.

For this example  _ = Space

Keyword
Keyword,
Keyword,_AAAA
Keyword_
Keyword_AAAA
Keyword____AAAA_BBBB

So any keyword followed by a space will be always highlighted in red color.

I hope i explained myself properly, thanks for your help and for developing such great program.
 
 

Edited 2 time(s). Last edit at 2022-10-21 03:57 by northwest.

Options: Reply | Quote | Up ^


#4 Re: Doubt about sintax highlighting

Posted by: pspad | Date: 2022-10-21 04:12 | IP: IP Logged

Thank you for explanation
I must check some configuration, but I am not sure if I'l be able to set it.

Options: Reply | Quote | Up ^


#5 Re: Doubt about sintax highlighting

Posted by: northwest | Date: 2022-10-21 07:31 | IP: IP Logged

pspad:
I must check some configuration, but I am not sure if I'l be able to set it.

Thank you!

Options: Reply | Quote | Up ^


#6 Re: Doubt about sintax highlighting

Posted by: maleuma | Date: 2026-02-01 17:24 | IP: IP Logged

Sorry, but I have the same problem as postet in 2022. Is there any solution for this now?
I'm currently trying to create a highlighter for BASIC. In this BASIC dialect, keywords do not need to be followed by spaces.

For Example PRINT and AT are keywords. It shows like this:
PRINTAT(15,13);"SPIELREGEL"
PRINT AT(15,13);"SPIELREGEL"

What do I have to change in the highlighter settings, so that in the first line the keywords are also highlighted?

Options: Reply | Quote | Up ^


#7 Re: Doubt about sintax highlighting

Posted by: maleuma | Date: 2026-02-01 18:47 | IP: IP Logged

Other example:

X=7:FORY=1TO7:PRINTAT(3,X);Y:X=X+4:NEXT
X=7:FOR Y=1TO 7:PRINT AT(3,X);Y:X=X+4:NEXT

Options: Reply | Quote | Up ^


#8 Re: Doubt about sintax highlighting

Posted by: pspad | Date: 2026-02-01 21:48 | IP: IP Logged

Hello. The only solution is add set of new keywords like PRINTAT
Can you sent me list of this possible "joined" keywords?

Options: Reply | Quote | Up ^


#9 Re: Doubt about sintax highlighting

Posted by: pspad | Date: 2026-02-02 05:08 | IP: IP Logged

I guess, the easiest way will be to create own highlighter.
There is few highlighter definitions, based on the BASIC.
Maybe some of them is already ready for your basic dialect. You can simple add new (joined) keywords

Options: Reply | Quote | Up ^


#10 Re: Doubt about sintax highlighting

Posted by: maleuma | Date: 2026-02-09 20:11 | IP: IP Logged

I have created an own highlighter for my BASIC.
Th Idea with the "joined" keywords is good. I will try it.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2026 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR