Mod Tool Scripting Editor: To color or not to color?

From a code editing perspective is it easer to read and edit when all the variable and identifier names are uniqely colored?


Or when their not colored?

  • Colored
  • Same Color
  • I dont care but wanted to respond anyway!
0 voters

If you’re going to give variables individual colors, I think it would be better not to color any other text.

Anyway, I would have the colored variables as an alternate view, with same-colored variables as the default.

1 Like

Now why did i not think of that. That may be the best of both worlds. What key combo should switching be bound to?


For reference the point of this mini editor, was that i wanted to have special syntax highlighting for my bindings in lua, so someone looking at or editing can at a glance see that the identifier typed in was part of my bindings.

P.S. you were right back here, to suggest using lua: Which python modules need to be included or packaged? I could never get the python to comparmentalize the way lua environments can.

1 Like

You should follow the same methodology that is used in emacs or one of its variants (betrays how old I am). Color implies function of the text. (variables, function names, macro names, classes, methods, etc.)

You know, I think madone has the right of it here. It’s very rare to need to see all or even two variables called out via highlighting. At least 90% of the time variables should all be a reasonable general-text color, and otherwise you’re considering one variable in particular. In that case, find and find-next + highlighting works great, and also works “for free” on non-variables, like string and number literals. Once upon a time I used an editor that gave variables unique colors, and years later I still don’t miss the feature.