Page 1 of 1

New syn file

Posted: Tue Feb 02, 2010 7:55 pm
by tshad
I am using 4.7.3 and want to add in a couple of keywords in the C/C++ sections.

I already added *.CS as a files in class of C/C++ class and it works pretty good but obviously doesn't have the keywords for C#, such as foreach.

I copied the cpp.syn file and created a cs.syn and added foreach to the keyword section but it still doesn't color it as a keyword.

Is there somewhere I need to tell textpad to use this file as well for the C/C++ type of files (C type of files) which I assume the "C = 1" at the start of the file does for you?

Thanks,

Tom

Posted: Thu Feb 04, 2010 5:50 pm
by helios
In order to enable the syntax highlighting, you will need to implement the following procedure:

Click on:

1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Plus sign next to "C/C++"
5. Syntax
6. Check the "Enable syntax highlighting" box.
7. Under the heading "Syntax definition file" Select
"cs.syn".
8. Click Apply / OK

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

1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. C/C++
5. Under the heading "Files in class", make sure that *.c 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 C files.
6.Click Apply / OK

More syntax definition files are available from Here:

http://www.textpad.com/add-ons/syna2g.html


I hope this helps.