How to change the font colour of symbols defined in the current context (e.g. $Context
) from black to some other colour, say purple?
There is a "SymbolContextStyles"
setting in Options Inspector under Editing Options | Private Editing Options | AutoStyleOptions. However, while you can set "System`"
,"Global`"
, and Automatic
there does not seem to be a way to set $Context
.
In Options Inspector I tried adding $Context -> {RGBColor[0.5, 0, 0.5]}
to the list and then "$Context" -> {RGBColor[0.5, 0, 0.5]}
for the selected notebook but that made no change. Adding Dynamic[$Context] -> {RGBColor[0.5, 0, 0.5]}
works but the notebook is near unusable when editing it; becomes very laggy.
I want the symbols defined in the notebook to have purple font colour. I only use notebook contexts so the Global`
setting is of no use to me.
Is there a way to do this?
Dynamic
version of$Context
with some front-end trick likeFrontEnd`Value["$Context"]
or whatnot. $\endgroup$Dynamic[$Context] -> {RGBColor[0.5, 0, 0.5]}
. It works but it kills the performance of the notebook just when editing. $\endgroup$Dynamic
isn't really what you want. You'll want something purely in the FE likeFrontEnd`Value["$Context"]
if it'll work. $\endgroup$