I know the TextPad text.syn syntax file says not to add keywords, but can it be modified to highlight comments? I've tried, and it doesn't seem to work... any work arounds? I'd really like to be able to start a line in a standard text file (i.e., "test.txt") with slashes (i.e., "//this is a comment") and have it hightlighted in yellow. I don't want to resort to non-standard file extensions (i.e., my files must end in ".txt").
Any ideas? Sorry if this is a FAQ... I didn't find it in any searches on this forum.
Thanks.
-- clint
-- clint@robotic.com
.txt files and highlighting
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
In the syntax file you can enter "//" for Single Comment or Comment Start.
Then in Configure, Preferences, go down to Document Classes and expand the tree. Open the Class you want the comments for, go to the section for Color, and choose the color on the right for your comments.
Before making Configuration changes, suggest that you close all TextPad documents first. Make the changes, Apply, and Save them. Close TextPad, and reopen it again. This has become standard practice for me because I have found that some configuration changes were not retained if documents were open. It may not always be necessary, but not a big deal to be sure of results.
Then in Configure, Preferences, go down to Document Classes and expand the tree. Open the Class you want the comments for, go to the section for Color, and choose the color on the right for your comments.
Before making Configuration changes, suggest that you close all TextPad documents first. Make the changes, Apply, and Save them. Close TextPad, and reopen it again. This has become standard practice for me because I have found that some configuration changes were not retained if documents were open. It may not always be necessary, but not a big deal to be sure of results.
Hope this was helpful.............good luck,
Bob
Bob
highlighting in .txt files
Okay, the way I got this to work was to change the TEXT=1 in text.syn to PERL=1. Not sure if this is a smart move, but it works.
-- Clint
-- Clint