Adding Language Support: 1.1 AWK
For an example we'll add some language support for the AWK programming language.
MWL file
For sample code, download Awk.mwl . Place this file in the Multi-Edit config directory.
Notes:
- The location of the Multi-Edit Config directory changed with version ME2006 10.04 to make it Vista compatible.
- There are multiple versions of AWK nowadays. You may wish to add entries to the supplied Awk.mwl file.
- Alternatively, you could place the
Awk.mwlfile in the Multi-Edit Defaults directory. In this case, I suggest write-locking all the other files in the Defaults directory so you don't accidentally change them. After making changes to theAwk.mwlfile in the Defaults directory, delete theAwk.mwlfile in the Config directory (if there is one) and restart Multi-Edit. Then when Multi-Edit first loads a.awkfile it will copy theAwk.mwlfile from the Defaults directory to the Config directory.
Add AWK Language Setup
- TOOLS → CUSTOMIZE → GENERAL(left side) → LANGUAGES
- Click 'Insert'
- In the ensuing “Language Setup” dialog:
- type AWK in the Language field
- check the “Case sensitive” box (at top)
- Leave “Reserved words” blank since we are using an Awk.mwl file
- Set Symbols field to .=+-*/:;<>$!^? [Note: you may add or subtract characters as you wish]
- Set Brackets field to ()[]{}
- Set Strings field to ” (double quote)
- Set End of line comments field 1 to #
- Click OK
[We will add more to this “Language Setup” dialog for AWK in further lessons.]
Add .AWK as a filename extension
- TOOLS → CUSTOMIZE → GENERAL(left side) → FILENAME EXTENSIONS
- In the resulting “Filename Extension Setup” dialog click 'Insert'
- In the resulting “Create New Record” dialog type AWK, click OK
- In the resulting “Edit Filename Extension Setup” dialog, set the Language field to AWK by clicking the ”…” button to the right of that field and select AWK from the ensuing dialog.
[See the section “The Edit Filename Extension Setup Dialog” in the Multi-Edit 2006 User Guide section The Multi-Edit Interface subsection “Filename Extension Specific Customization” for further filename extension customization options.]
