Syntax Editor/Color Coding..

Ask how to do things or if a certain feature is available in the program.
Post Reply
Ranashi
Posts: 17
Joined: 16 May 2016 17:49

Syntax Editor/Color Coding..

Post by Ranashi »

Ok, I am trying to setup a new codex/snytax component for some internal code used. I am not wanting to use all the default colors and want to force in some unique color combinations. I am having difficulties trying to figure out how to do this or if it can be done within the .syx file.

Currently I am looking at a couple things one - under comments ie [Options] I would like to assign specific colors to lines using some kind of predefined color option. I would also like to do the same within [Keywords]

Currently - I am only able to figure out how to define this by how far down the options are using the standard color pallet that is assigned. Is this something that can be added in? or is this something I am missing with a control option?

Colors correspond directly to the keyword line number:
Example:
[Keywords]
control=select|input|delete
operands=and|or
output=into

*keyword1 = blue (#4039C1), keyword2 = brown? (#91420A), keyword3 = orange (#FF6600)

The only way I could have "control" show up in Orange and "output" show up in blue would be to change the order that I have them set based on keyword order. As I cannot see how to define a color other than manually setting a color vs defining in the syx file I would import.

[Keywords]
output=into
operands=and|or
control=select|input|delete

That led me to the next question of how would I choose it for the [Options] items like comments numbers etc. Then on top of that - is there a method to set a color difference for bold italic and/or underline via the syx file?

User avatar
Rickard Johansson
Site Admin
Posts: 6300
Joined: 19 Jul 2006 14:29

Re: Syntax Editor/Color Coding..

Post by Rickard Johansson »

All colors are set in the themes manager (Environment->Themes->Customize). So you have different colors for different themes.

Ranashi
Posts: 17
Joined: 16 May 2016 17:49

Re: Syntax Editor/Color Coding..

Post by Ranashi »

Is there way to force them in a syntax file? I am hoping to make this easier for multiple people to use to match what they are use to using with our standard in house editors. We have a custom command language, and I am configuring the syntax to work with that however things like comments are difficult to read at times, or that is a complaint I have had. I was hoping a method to force these with a syntax editor, so they can see them like they would within our normal compiler they are using (it is limited within functionality). RJ TextEd is way better for over all working with the scripts, however they still need to compile them in our compiler and requested if there was an easy way to get the coloring to be passed over in the syntax file. (Sorry I didn't get back to this sooner my laptop went into get serviced so I was on a loaner PC).

User avatar
Rickard Johansson
Site Admin
Posts: 6300
Joined: 19 Jul 2006 14:29

Re: Syntax Editor/Color Coding..

Post by Rickard Johansson »

Skärmklipp_cr.png
Skärmklipp_cr.png (20.76 KiB) Viewed 883 times

You could set the correct colors for your own theme and then use the export function to save them to a file. Use import to set the same colors on another installation.

Post Reply