Customize TextEditor Highlight

Post

Posted
Rating:
#1 (In Topic #1299)
Regular
sergioabreu is in the usergroup ‘Regular’
 Is it possible to "extend" or modify an existent highlight/mode "javascript" to deal with more keyworkds to cover also php or python ?

Keywords not recognized (for instance):

Python:  def

PHP: foreach, $dollar variables etc
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
it's all done by regular expressions.

This is the javascript highlight file…
comp/src/gb.highlight/highlight/javascript.highlight · master · Gambas / gambas · GitLab

Read this, there are full instructions on how to use…
/doc/highlight - Gambas Documentation

i guess you could copy the javascript file into your project and modify it , then register it as normal , "I assume" that would override the built-in javascript highlight.

Or just rename it to say MyJavaScript and make js files use MyJavascript instead.
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
sergioabreu is in the usergroup ‘Regular’
I will study it carefully

Thanks  :)
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
sergioabreu is in the usergroup ‘Regular’
Which folder in the project should be put the .highlight files in ?
Online now: No Back to the top

Post

Posted
Rating:
#5
Guru
BruceSteers is in the usergroup ‘Guru’

sergioabreu said

Which folder in the project should be put the .highlight files in ?

I do not know for sure , I have never used custom highlighting , .conf i think
Online now: No Back to the top

Post

Posted
Rating:
#6
Guru
BruceSteers is in the usergroup ‘Guru’

BruceSteers said

sergioabreu said

Which folder in the project should be put the .highlight files in ?

I do not know for sure , I have never used custom highlighting , .conf i think

although i think that is for making the IDE support the syntax.

I think you can put your highlight files anywhere but you "Register" them using the methods from the instructions on program load.
Online now: No Back to the top
1 guest and 0 members have just viewed this.