NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Custom Syntax Highlight


Joined: 26 Feb 2004
Posts: 6
Reply with quote
Excellent program, really matured since I last took a look. I read in a post here that hl.cfg can contain custom syntax highlighting, can you enlighten me as to the format of the xml for this as currently the file only contains the xml PI and a root element. We use a custom content engine that I would love to syntax highlight in phped.
View user's profileFind all posts by agoughSend private message


Joined: 26 Feb 2004
Posts: 6
Reply with quote
my hl.cfg now seems to have all the xml for preset syntax highlighting, I added my own and even added it to filetypes in phped.cfg but doesn't seem to have worked, any ideas?? can this be done??
View user's profileFind all posts by agoughSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
What syntax highlighting are you trying to add ?
C# or Ada ?
Or maybe something else ?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 26 Feb 2004
Posts: 6
Reply with quote
It is for a custom content engine that we use, I was just wondering if it is possible to create our own syntax file for it. I already have one for use in UltraEdit my current default editor. Currently my company use a range of editors and I would like to standardise where possible to a single editor. With its PHP debugging capabilities PHPed is currently the front runner. It would just be nice to be able to create my own syntax definitions.
View user's profileFind all posts by agoughSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
No, phped 3.3 does not support custom syntax schemes. Probably with a next version it will.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Jun 2006
Posts: 17
Reply with quote
Hi again, Dmitry.

Have just upgraded PHPEd build to 4620 searching for this feature...

We need to add a new highlighting scheme for custom tags.
Here's a code example:

Code:

<!-- START: DataForm -->
<table border="0" cellpadding="0" cellspacing="0" class="dataForm">

<tr>
<td class="dataFormLT"></td>
<td class="dataFormTitle"><com:TLabel ID="Title" /></td>
<td class="dataFormRT"></td>
</tr>

</table>
<!-- END: DataForm -->



To make long story short: we have our custom <com:* ... /> tags.
No matter how I tried to play with reserved keywords, predefined functions,
different syntax schemes or dynamic syntax highlighting nothing worked.

Another example of such a limitation (this is no more actual) is to change
Smarty delimiters (library expects such a customization) however, phped
only supports { and }.

Is it possible to configure parsers using this hl.cfg file? Possibly, no...

Any solution?
View user's profileFind all posts by sergeymorkovkinSend private messageICQ Number
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
To make long story short: we have our custom <com:* ... /> tags.
No matter how I tried to play with reserved keywords, predefined functions,
different syntax schemes or dynamic syntax highlighting nothing worked


it's not possible in v4.6. We'll try to implement tag-specific highlighting in one of the next versions.

Quote:
Another example of such a limitation (this is no more actual) is to change
Smarty delimiters (library expects such a customization) however, phped
only supports { and }.

Is it possible to configure parsers using this hl.cfg file? Possibly, no...

Aha, Smarty supports different delimiters and we already got a request to support multicharacter delimiters like these "(*" "*)".
Yet it's not that simple and we can't implement it in 4.6. At least multicharacter. Although we'll consider doing it for one of the next versions.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Aug 2006
Posts: 10
Reply with quote
started to evaluate phped 4.6 today dimitri, finally Smile

One of the features we'd like is to be able to use multi-character delimiters in smarty and have our ide pick up on this. We use {? and ?} as delimiters which aids us greating when writing oo-javascript code in smarty templates.
View user's profileFind all posts by dominiccSend private message
Custom Syntax Highlight
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic