# Syntax Menu

Selecting the right syntax will highlight the operators correctly. In the Editor, it is only cosmetic but can help find spelling errors etc.
The syntax list is also used for "auto-completion".

Selecting "txt" as the syntax will give you a keyword free page to work with.

MMEdit scans the data folder for *.tkn files during start-up. Any files found will be considered syntax files and the menu list will be populated. The files are not checked for validity until chosen.

You can add your own syntax files. If you edit one of the existing files, it will be overwritten with the next MMEdit update so if you don't want that to happen, save it under a different name.
The first two lines of the syntax file hold the version and then the options that vary between devices.
These lines are not used by MMEdit V5 but are retained for backward compatibility and must be present.

You can also create a "user.tkn" file and place it in the data folder. This file does not need the first two lines reserved.
If the file exists when MMEdit starts, all the keywords in that file are added to ALL syntax files. when they are selected.

Set default syntax is the last item of the menu. To set, first select the syntax you want to use then "Set default syntax"
Now when a new file is opened or file loaded that doesn't have the ' kw\ directive in the first line will use the chosen syntax.

Within the keyword files, there are a number of long lines of keywords. The lists include some but not all parameters. What to include is a personal preference and should not be considered definitive.
The keywords determine the highlighting and also are used for the variable report.

Currently, all lines of keywords are combined into one list so the line in which a keyword is found is not significant.
Blank lines are OK in the syntax file and may help readability.

The list of *.tkn files is created on start-up so if any syntax files are added, they won't be found until next MMEdit start-up.
The *.tkn files are found in the Data folder, the location of which can be found from Help/About

Last edited: 21 August, 2022