Different colors for Syntax Highlighting
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Different colors for Syntax Highlighting
Hello, I've looked through the forums and can't find if there is a way for me to choose the color for each of the Keyword groupings. To me, they all look like different chades of blue and I would like to add green and red to the mix. Is there anyway to specify the color for a keyword group?
I am.
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Syntax files are associated under Classes.
Open Classes and you will see Colors.
Under Colors you will see keywords.
I usually make a comment in my syntax files under the heading of each Keyword, that makes note of the color numbers I have selected. Then if I use the same syntax file on another machine, it makes it easy to remember which colors you used and all machines will have the same color.
Steps:
Close all other copies of TextPad
Close ALL documents so that none are open
Configure/Preferences/Document Classes
Expand the Class you are defining
Make note of the syntax file you have selected.
Click on Colors
Select each of the Keywords and assign the colors.. Make note of the RGB values you are using.
Apply and OK your way out.
Close Textpad.
Modify the syntax file, entering the color values as a comment beneath each Keyword group. Use a semicolon at front of comments. Save the syntax file.
Start TextPad.
Open the documents for that Class and you should be all set.
Here is a sample from a Syntax file I have created for Macro Scheduler:
Open Classes and you will see Colors.
Under Colors you will see keywords.
I usually make a comment in my syntax files under the heading of each Keyword, that makes note of the color numbers I have selected. Then if I use the same syntax file on another machine, it makes it easy to remember which colors you used and all machines will have the same color.
Steps:
Close all other copies of TextPad
Close ALL documents so that none are open
Configure/Preferences/Document Classes
Expand the Class you are defining
Make note of the syntax file you have selected.
Click on Colors
Select each of the Keywords and assign the colors.. Make note of the RGB values you are using.
Apply and OK your way out.
Close Textpad.
Modify the syntax file, entering the color values as a comment beneath each Keyword group. Use a semicolon at front of comments. Save the syntax file.
Start TextPad.
Open the documents for that Class and you should be all set.
Here is a sample from a Syntax file I have created for Macro Scheduler:
[Keywords 4]
;Red (255,0,0)- Navigation
Goto
Label
Repeat
Until
Gosub
SRT
End
[Keywords 5]
;Sea Green (64,128,128)- Visual Basic
VBSTART
VBEND
VBEVAL
VBE
VBRUN
VBR
Hope this was helpful.............good luck,
Bob
Bob