Torque Syntax Highlighting
by Brandon Beauchene · 03/02/2005 (12:09 am) · 5 comments
Download Code File
Directions:
1) Download and install Textpad 4 (http://www.textpad.com)
2) Downlaod the torque.syn file Ive uploaded and save it to the system folder inside where you have installed textpad (C:\program files\textpad4\system for example)
3) Run textpad
4) Click Configure->New Document Class
5) Enter Torque (or whatever name you want to give it) and click next
6) in the class members box you will enter in all of the file extensions you use for torque script (i use cs and gui files so I enter in *.cs, *.gui) and click next
7) check the enable syntax highlighting box, and find the torque.syn in the dropdown box, then click next, then finish.
Now you have your document class assigned, now it just needs some colors assigned.
1) click Configure->Preferences
2) In the left pane, expand the Document Classes listing, then Expand Torque (or whatever name you gave it)
3) select colors from the left pane, then click defaults in the right pane
4) for Keywords 1 through keywords 6 is what your interested in setting, you can set them to whatever color is your preference :
Keywords 1 = Keywords (break, true, false, if, else, for, while, etc)
Keywords 2 = Formatting Codes (\n, TAB, SPC, etc)
Keywords 3 = Torque Built in datablocks (PlayerData, ShapeBaseData, etc)
Keywords 4 = Object Type Masks (GameBaseObjectType, CorpseObjectType, etc)
Keywords 5 = Torque Built in objects (AIPlayer, Camera, Lightning, Item, etc)
Keywords 6 = Torque Console Script Commands (QueryMasterServer, Quit, Schedule, etc)
You may also want to set the tabulation for autoindenting and also change the tabs from 8 to 3 or so. Check out all the options and find the ones that work for you. Hope this helps anyone like me :)
Directions:
1) Download and install Textpad 4 (http://www.textpad.com)
2) Downlaod the torque.syn file Ive uploaded and save it to the system folder inside where you have installed textpad (C:\program files\textpad4\system for example)
3) Run textpad
4) Click Configure->New Document Class
5) Enter Torque (or whatever name you want to give it) and click next
6) in the class members box you will enter in all of the file extensions you use for torque script (i use cs and gui files so I enter in *.cs, *.gui) and click next
7) check the enable syntax highlighting box, and find the torque.syn in the dropdown box, then click next, then finish.
Now you have your document class assigned, now it just needs some colors assigned.
1) click Configure->Preferences
2) In the left pane, expand the Document Classes listing, then Expand Torque (or whatever name you gave it)
3) select colors from the left pane, then click defaults in the right pane
4) for Keywords 1 through keywords 6 is what your interested in setting, you can set them to whatever color is your preference :
Keywords 1 = Keywords (break, true, false, if, else, for, while, etc)
Keywords 2 = Formatting Codes (\n, TAB, SPC, etc)
Keywords 3 = Torque Built in datablocks (PlayerData, ShapeBaseData, etc)
Keywords 4 = Object Type Masks (GameBaseObjectType, CorpseObjectType, etc)
Keywords 5 = Torque Built in objects (AIPlayer, Camera, Lightning, Item, etc)
Keywords 6 = Torque Console Script Commands (QueryMasterServer, Quit, Schedule, etc)
You may also want to set the tabulation for autoindenting and also change the tabs from 8 to 3 or so. Check out all the options and find the ones that work for you. Hope this helps anyone like me :)
#2
This always seems to happen, when editing an already uploaded resource. (Attachements have to be uploaded for every edit.)
03/02/2005 (3:42 am)
Yes, donwload not working.This always seems to happen, when editing an already uploaded resource. (Attachements have to be uploaded for every edit.)
#3
03/02/2005 (1:36 pm)
still not working...
#4
03/02/2005 (2:21 pm)
Ok i re-uploaded....should work now if not then ill just post the whole file here
#5
03/02/2005 (10:33 pm)
ok well i just noticed that Daniel Neilsen had already posted a textpad syntax file. Didnt know one was out there, but maybe i wasnt looking in the right places. Considering the fact that mine is based out of the 3D Game Programming All In One references im sure its not as complete as some other ones. But I tried :) 
Torque Owner Harold "LabRat" Brown