How to exploit UltraEdit-32 to highlight code based on file extensions

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. Besides 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 one syntax highlighting for an extension that is not mapped in UE. For example if you use ProC, which file extension is .pc, you may want UE to default to the C highlighting for ProC files. You can do that by editing the 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 highlight. Each language start with /Ln, where n is a number. At the end of the row where /Ln is 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