Syntax of Modewhen Rules section

The rules sections contain a number of lines that describe the filetypes and paths against which a file's type and name will be matched.

The Rules sections have this format:

Rules [Exclude | Include]{*}
  [applies-to] filetypes , wildcarded path [ ; match expression ]
  [applies-to] filetypes , wildcarded path [ ; match expression ]
...
End
The optional applies-to can be one of the following:

Filetypes can be one or more hexadecimal values from 000 to fff (separated by space). If this line should apply to all filetypes, use * or blank. If you want to accept all filetypes *except* for this list, put a ~ in front of the first filetype.

Wildcarded Path is used if you want to select the mode on the name of the file, or the directory it is in. There are two wildcards you can use:

Otherwise text here is matched literally.

Match expression is optional and is the name of a search expression defined in the Match section. StrongED will try to match this against the first 1KB of the text, and if it matches, this mode is used. Since the file must already be loaded to do this, this can only be used with Rules with an initial >.
Note that this does a *match* and not a *search*. If you want to search, you must have "**" as the first part of the expression.

You can have several match expressions after one another (with a space between). The file will then be selected if it matches any of them.

Separator between sections can be either a comma or a semicolon and should have a space before and after.

Note that if you leave out the spaces either side of the separator, then a comma will not work following the Path since a comma is a legal part of a directory or file name. It is therefore advisable to always use spaces.

Other relevant pages

Top of page


Page Information

http://css.torrens.org/valid-html401-bluehttp://css.torrens.org/valid-css Document URI: http://stronged.torrens.org/man/modes/rules.html
Page first published Tuesday the 3rd of July, 2018
Last modified:Thu, 05 Jul 2018 14:11:24 BST
© 2018 - 2018 Richard Torrens.