UltraEdit-32 (UE for short from now on) is a wonderful text editor. You can use it as a simple text editor or to write programs using your favorite languages. Among other features, UE offers syntax highlighting for the most common programming languages out there. UE recognizes the type of file by looking at its extension. However, sometimes, you might want to use a syntax-highlighting definition for an extension that is not mapped in UE. For example, if you use ProC, whose file extension is .pc, you may want UE to default to the C highlighting for ProC files. You can do that by editing UE’s wordfile.txt file. UE uses this file to understand how to highlight words. To edit this file, from the UE menu go to: Advanced -> Configuration -> Editor Display -> Syntax Highlighting. From this window you can open wordfile.txt by clicking on the Open button in the Full path name word list section. In this file you’ll find all the languages that UE highlights. Each language starts with /Ln, where n is a number. At the end of the /Ln line, you can see “File Extensions = extensions”. Just append the extension you need to highlight for that language and save the file. Restart UE and open the file with the extension you just mapped. Enjoy the result! :-)
Here is an example for the Pro*C extension (.pc):
/L1”C/C++” C_LANG Line Comment = // Block Comment On = /* Block Comment Off = */ Escape Char = String Chars = “’ File Extensions = C CPP CC CXX H HPP AWK
This line is extracted from the wordfile.txt file. To add the Pro*C extension, I just added PC at the end of File Extensions, that is, after AWK:
/L1”C/C++” C_LANG Line Comment = // Block Comment On = /* Block Comment Off = */ Escape Char = String Chars = “’ File Extensions = C CPP CC CXX H HPP AWK PC