Does anyone know if there is a color syntax highlighting style specifically for JOINS? Or if not, would I be able to create a custom style?
In other words, I currently have joins highlight in blue because that’s how I have the “Reserved word” style is set up. But ideally I would like JOINs and probably ONs with a separate color from the rest of reserved words. Is that possible?
Thread created by dorianpc
Does anyone know if there is a color syntax highlighting style specifically for JOINS? Or if not, would I be able to create a custom style?
In other words, I currently have joins highlight in blue because that's how I have the "Reserved word" style is set up. But ideally I would like JOINs and probably ONs with a separate color from the rest of reserved words. Is that possible?
Here's an example I whipped up to show those words in lime green.
In Options on the Editor, Behavior tab click the "..." button in the Languages groupbox to edit the PL/SQL lexer.
On the Highlighting tab click Add to create a new style. Give it a name and set the Font attributes as you want. I chose lime.
On the Rules tab click Add to add a new lexer rule. Give it a name and set the Rule Type to "Tag detector" on the Properties tab to the right.
Set the Style to the newly created style you made in step #2.
On the Conditions click the "+" and check Identifier as the Token type to look for.
Uncheck "Include all tokens" and add JOIN and ON, one per line.
Select the Keywords style, conditions tab and remove JOIN and ON from that parser rule. Click OK and OK again on the options window. JOIN and ON will now be highlighted differently than other keywords. As you add new words to your new parser rule be sure to remove them from the Keywords list.
That's awesome.That should work perfect for me. Any clue why it wouldn't work in a newer version of Toad? I was planning to upgrade soon but this small detail is worth not upgrading for now. Thanks for the example.
Here's an example I whipped up to show those words in lime green.
In Options on the Editor, Behavior tab click the "..." button in the Languages groupbox to edit the PL/SQL lexer.
On the Highlighting tab click Add to create a new style. Give it a name and set the Font attributes as you want. I chose lime.
On the Rules tab click Add to add a new lexer rule. Give it a name and set the Rule Type to "Tag detector" on the Properties tab to the right.
Set the Style to the newly created style you made in step #2.
On the Conditions click the "+" and check Identifier as the Token type to look for.
Uncheck "Include all tokens" and add JOIN and ON, one per line.
Select the Keywords style, conditions tab and remove JOIN and ON from that parser rule. Click OK and OK again on the options window. JOIN and ON will now be highlighted differently than other keywords. As you add new words to your new parser rule be sure to remove them from the Keywords list.