How to enable syntax highlighting

Instructional HowTos, posted by users. No questions here please.

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

Post Reply
helios
Posts: 716
Joined: Sun Mar 02, 2003 5:52 pm
Location: Helios Software Solutions
Contact:

How to enable syntax highlighting

Post by helios »

In order to enable syntax highlighting in TextPad, you will need to implement the following procedure for each document class, as in the example for Java below:

Click on:

1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Plus sign next to "Java"
5. Syntax

6. Check the "Enable syntax highlighting" box.
7. Under the heading "Syntax definition file" Select
"java.syn".
8. Click Apply / OK

Please ensure that *.java is a member of the Files in class as follows:

1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Java
5. Under the heading "Files in class", make sure that *.java is in the list. If it is not there, then you will need to add it to the list, along with any other file extensions that you are using for Java files.
6.Click Apply / OK

New documents must be saved with the relevant extension, in order for the syntax highlighting to be activated.




http://www.textpad.com
Last edited by helios on Mon Jul 03, 2006 9:08 am, edited 5 times in total.
Helios Software Solutions
junding
Posts: 1
Joined: Wed Mar 19, 2003 7:56 pm

can't find Python22_1.syn from the list

Post by junding »

I try to create a syntax highlight for Python, download Python22_1.syn and copied it into both \system and \Samples subfolder. But when in your step 7, I can't find Python22_1.syn from "Syntax definition file" list. What should I do? Thanks.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Check under Configure/Preferences/Folders which folder is set for syntax and place your file there...
User avatar
Dag
Posts: 2
Joined: Sun Mar 30, 2003 2:21 pm
Location: RUS
Contact:

Post by Dag »

My combo-box is empty; syntax highlight works with html (and only). how I can highlight xml? How to add Syntax definition file?

Willyou:
a) add tidy in new versions;
b) make unicode support.

Tnx, Dag
nicomen
Posts: 8
Joined: Wed Jun 16, 2004 7:24 pm
Location: California

Post by nicomen »

That's the same posting that I used.....I didn't work. I went through it again replacing "java" with "html"....to a T, I followed the instructions. Shut TP down and restarted it....still the same. I never had this problem with 4.7.1...only started when I upgraded.

Thanks anyway!

nicomen
User avatar
Bob Hansen
Posts: 1517
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

I have it found it best to make sure ALL Textpad documents are closed before setting Configuration Preferences.

1. Open TextPad
2. Close All Documents
3. Configure
4. Preferences
5. Make changes as necessary
6. Apply
7. OK
8. Close TextPad
9. ReOpen TextPad.......preferences have been saved.
Hope this was helpful.............good luck,
Bob
fmortara
Posts: 1
Joined: Sat Aug 28, 2004 4:39 pm

Post by fmortara »

hi!
i have activated highlight for *.php...
but in the .php file, the text are only in black...

whi?
hot to for highligth text??

thaks...
Sorry for my english...

hi!
Francesco
User avatar
Bob Hansen
Posts: 1517
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Hello Francesco....

Excerpt from http://www.textpad.com/forum/viewtopic.php?t=3755

Please do not post questions here. Use either the General or Java forum

This forum is for you to post helpful instructions on how you have done things with TextPad.
Hope this was helpful.............good luck,
Bob
Post Reply