.txt files and highlighting

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
rman666
Posts: 4
Joined: Fri Jun 04, 2004 4:08 am
Location: milwaukee, wi
Contact:

.txt files and highlighting

Post by rman666 »

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
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

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.
Hope this was helpful.............good luck,
Bob
rman666
Posts: 4
Joined: Fri Jun 04, 2004 4:08 am
Location: milwaukee, wi
Contact:

Post by rman666 »

Yes, but this does not seem to work for the "text.syn" definition file. Or, did you get it to work? Specifically, I need it to work with "*.txt" files.

Thanks for your help.

-- Clint
rman666
Posts: 4
Joined: Fri Jun 04, 2004 4:08 am
Location: milwaukee, wi
Contact:

highlighting in .txt files

Post by rman666 »

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
Post Reply