SYNOPSIS:

NST text windows can render their text according to a language syntax. Each language syntax is defined by an integer id, currently available definitions are

   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 unit

To 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).

CUSTOMIZING DEFAULT COLOR BINDINGS:

The entries in nstsyntaxcolors consist of zero or more blocks of the form (blanks can be inserted at will)

   # 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 colorname

that 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

AVAILABLE COLOR NAMES:

Currently, recognized color names are restricted to the following: (those listed in nst_X11.c): black white red red2 red3 red4, VioletRed IndianRed orange DarkOrange gold yellow GreenYellow green green2 green3 green4 MediumSpringGreen aquamarine3 LightSeaGreen DodgerBlue3 MediumBlue blue blue2 blue3 blue4 magenta magenta2 magenta3 magenta4 cyan cyan1 cyan2 cyan3 brown brown2 brown3 brown4 violet VioletRed DarkViolet grey DimGrey SlateGrey LightGray khaki bisque with upper and lower case letters not distinguished. The further colorname textcolor chooses the normal text color (whatever it is). A convenient way to try out colors is the usage of the %!<colorname> directive in an input_window: this will print colorname directly in the color that it denotes. DISABLING SYNTAXCOLORING To disable syntax coloring for language N, put the line syntax N nocolor into nstsyntaxcolors

FILE

/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../nstsrc/nst_syntax.c