Select resources

Since several selects now appear in each of our ctedits -for the current selection, the interpreter warning message selection, and the variable highlight selection- we must fine tune their presentation so that we may distinguish them. First we add a few resource specifications to the file: contrib/Exp/pprinters/pprinters.rdb


*visual-mono*formalism-Exp.Pprinter.Format.select-highlight-variable.Mode: t
*visual-color*formalism-Exp.Pprinter.Format.select-highlight-variable.foreground:\resbs
PaleGoldenrod
*visual-color*formalism-Exp.Pprinter.Format.select-highlight-variable.background:\resbs
ForestGreen
*formalism-Exp.Pprinter.Format.select-highlight-variable.Mode: static
*formalism-Exp.Pprinter.Format.select-highlight-variable.Priority: 1

The Mode property of a select determines the appearance of a selected token when these colors are not explicitly specified. Please consult the resource manual for an explanation of this property.

To emphasize the Exp select when it overlaps the current selection, we make use of the ctedit Priority property. When two selects overlap, the select assigned the highest priority number wins. By default, all selections, including the current selection, have priority zero, so in our resource specifications, we assign the highlight select a priority of one.


Tutorial