You are here: PSPad forum > English discussion forum > Basic question about Syntax highlighting

Basic question about Syntax highlighting

#1 Basic question about Syntax highlighting

Posted by: lozzer1962 | Date: 2012-07-26 09:40 | IP: IP Logged

Hi, please excuse my ignorance. I am wanting to use PSPad to make the editing of a few specific text files easier.

They are all comma separated files, each line beginning with either a number or a command. I have read through the Help documentation and tried to edit the User Highlighter Definitions (I am not a programmer myself). Can anyone please point me in the right direction (except out of the door please).

A couple of examples of the type of data are below…

5, 9, 272.12.50, 89.10.20, 9.5630, 1.491, F2, GT

(I want to identify those lines which begin with specific numbers and highlight the entire line up to but not including the data in fields 7 and beyond)

5, 16, 9.13.25, 91.57.05, 67.5940, 1.491, .C, -SI0.05/0.15

(as above, but I want it to highlight in a different colour everything including and after ‘-SI’. I have about forty of these sets of characters -SO -NLP -SI etc)

CONTOURS, 0.1, 2.013,1,1, 0.5, 4.035,1,1, 0.5, 0.125, 5.0, 2.0, 0.5, 0.01, 5.013, 5.035
STATIONS, 5, NAMES , LEVELS
GRID, CROSS, 50.00, 7.01, 0.2, INCREAS, 1.0, 1.0

(There are several of these types of record, each beginning with a word and followed by a series of comma separated fields)

I hope that I have asked the right question and hope that someone out there will be kind enough to help.

Thank you.

Options: Reply | Quote | Up ^


#2 Re: Basic question about Syntax highlighting

Posted by: myf | Date: 2012-07-27 15:01 | IP: IP Logged

I'm afraid it is not possible to meet your needs; user highlighter can only define keywords and use predefined comment patterns (in general) so beside comment and four keyword groups there is no other way to (user) highlight your code.

If you point mr Fiala to exact specification of syntax of your language (and possibly some proof that there might be some relevant user base) he might be opened to implement it natively.

Options: Reply | Quote | Up ^


#3 Re: Basic question about Syntax highlighting

Posted by: lozzer1962 | Date: 2012-07-31 10:07 | IP: IP Logged

Hi,

Many thanks for your help. We have a userbase of about 2,500 customers which is probably small in comparison to the overall PSPad userbase, so I doubt whether it would be of interest to him.

I'll keep on looking elsewhere.

Options: Reply | Quote | Up ^


#4 Re: Basic question about Syntax highlighting

Posted by: myf | Date: 2012-08-21 21:01 | IP: IP Logged

Ok. But just for curiosity, is there some specification of your syntax. Even if it will not get attention / support, it might be interesting for reference.

Options: Reply | Quote | Up ^


#5 Re: Basic question about Syntax highlighting

Posted by: PEdit | Date: 2012-08-28 11:58 | IP: IP Logged

to orig. author:
I'd suggest to use alternate editors, which have simple syntax files. For ex: HippoEdit (has xml schema files), SynWrite (has visual editor).

Options: Reply | Quote | Up ^






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