0 a minimal default syntax (permitting only the coloring of Neo variables) 1 input window description format 2 output window description format 3 C language as used by prog_unit 4 definition string for remake unit 5 option string for mouse unit 6 reserved for Tcl/Tk language 7 reserved for matrix algebra unitTo tell a text widget to use the coloring scheme for language N, put a %Nh directive (where N=1..5) before its %t token. If no %Nh directive is given, the minimal default syntax 0 is used. A default color scheme is provided. It can be redefined with a file named ".nstsyntaxcolors" that is expected in the home directory (provide at least an empty file; otherwise, there will be a warning).
# a hash introduces a comment syntax N # specify colors for language N keyword red string yellow comment blue neovariable white ...A line that starts with the keyword "syntax" selects a language and may be followed by zero or more lines of the form
syntaxclass colornamethat select color "colorname" for all tokens from the syntactic class "syntaxclass". Currently recognized syntax classes are:
keyword keywords of the selected language keywordn (n=1..9) for up to nine further sets of keywords or tokens that may have been defined as separately colorable sets string strings comment comments neovariable $i or @i or ${name} or @{name} neo variables optionsym the '%' option symbol optionchar the option character (say, 'C') that terminates a '%' option optionarg any option arguments between '%' and 'C' callbacksym the symbol that indicates a callback callbackname the name of the callback(s)The precise definitions of these syntax classes and keyword sets are language specific and are currently compiled into the nst_syntax.c file (actually, they are laid down in the syntax_t structs defined there). Currently only the color bindings to the predefined syntax classes can be changed in nstsyntaxcolors