hi there,
I want to be able to open TextPad with HTML syntax highlighting as default [as opposed to plain text highlighting as it does now.]
I tried to move the "*. " document type from text to HTML in the document classes, but this doesn't work.
anybody have any idea how to do this?
thanks,
ned
making new document open with html syntax as default.
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
I don't know how to change the syntax file for the default, but how about making a macro to change the syntax of the current document?
1. Load the document.
2. Run the macro.
Macro does the following:
From the Main Menu select View, Document Properties. go to the tab for Syntax. Be sure to have a check in the box to Enable Syntax Highlighting. In the drop down box for syntax definition file, select (or type in) html.syn. Click on Apply, and OK.
This is a quick and dirty, untested thought
Hope this helps......
1. Load the document.
2. Run the macro.
Macro does the following:
From the Main Menu select View, Document Properties. go to the tab for Syntax. Be sure to have a check in the box to Enable Syntax Highlighting. In the drop down box for syntax definition file, select (or type in) html.syn. Click on Apply, and OK.
This is a quick and dirty, untested thought
Hope this helps......
Last edited by Bob Hansen on Thu Jun 17, 2004 3:49 pm, edited 1 time in total.
Hope this was helpful.............good luck,
Bob
Bob
Macro to change syntax highlighting
I would also like to write a macro to apply a particular syntax highlighting style to the current file (in my case to apply Unix shell script highlighting, as Unix shell scripts tend to be hard to identify automatically by wildcarding).
However, I seem to be unable to record such a macro, since the View/Document Properties menu item is always greyed out when I am recording a macro.
Any help appreciated.
However, I seem to be unable to record such a macro, since the View/Document Properties menu item is always greyed out when I am recording a macro.
Any help appreciated.
Lionel B
Just for the record, the Document Properties dialog box cannot be used when recording a macro.
In order to have HTML syntax file applied as the default:
From the Configure menu choose:
1. Preferences
2. File
3. Change the Default file extension to HTML
4. Click Apply / OK.
In order to enable the syntax highlighting, you will need to implement the following procedure, as below:
Click on:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Plus sign next to "HTML"
5. Syntax
6. Check the "Enable syntax highlighting" box.
7. Under the heading "Syntax definition file" Select
"html.syn".
8. Click Apply / OK
Please ensure that *.html is a member of the Files in class as follows:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. HTML
5. Under the heading "Files in class", make sure that *.html 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 HTML files.
6.Click Apply / OK
I hope this helps.
In order to have HTML syntax file applied as the default:
From the Configure menu choose:
1. Preferences
2. File
3. Change the Default file extension to HTML
4. Click Apply / OK.
In order to enable the syntax highlighting, you will need to implement the following procedure, as below:
Click on:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Plus sign next to "HTML"
5. Syntax
6. Check the "Enable syntax highlighting" box.
7. Under the heading "Syntax definition file" Select
"html.syn".
8. Click Apply / OK
Please ensure that *.html is a member of the Files in class as follows:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. HTML
5. Under the heading "Files in class", make sure that *.html 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 HTML files.
6.Click Apply / OK
I hope this helps.
Helios Software Solutions
Re: Macro to change syntax highlighting
lionelb wrote:I would also like to write a macro to apply a particular syntax highlighting style to the current file.
Hmm... so is this just not possible? Can't think of a workaround, bar waiting for proper scriptable macros...helios wrote:Just for the record, the Document Properties dialog box cannot be used when recording a macro.
Lionel B
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm