== Problem ==
When we edit Lua oring pages containing Lua, JavaScript or CSS code, we don'twe can't easily see what we have change,has changed due to a lack of syntax highlighting. and mMany times that needs a big memorya a lot of mental concentration.
== Who would benefit ==
All Lua, JavaScript ... coders.
== Proposed solution ==
When we edit Lua or JavaScript code, highlight differences like in Gerrit ( - + parts of line).
Do this when we explicitly ask differences, but also as option in any change from the previous version.
== Description of the task ==
The way used in gerrit to display changes in source code seems better than some others.
In code panels, for old and new codes, gerrit colorises them in red and green for each changed character.
Then we could use it for other source codes: javascript for gadgets and user scripts, Lua modules, Lisp for templates.
== Enhancements in short ==
This change could "colors for each character", displays "in codes panels", "highlights" better than actual MediaWiki use cases, select or not each of ways for highlights, and "the user chooses these ways for each code panel", for any code sources, even wikitext. Highlight from the last change or from the last "Preview". See below.
== Some chooses to select ==
Guerrit uses **2 ways**, which mode use?
In the **mixing** way, gerrit mixes the old and the new code lines, identify them with - and + signs, and highlights them with red and green colors for each character.
In the **columns** way, gerrit put the old code in left and the new code in right column, and highlights them with red and green colors for each character.
This styles also interfere with the **usual highlight** of each code.
**Where to use** these display ways?
Perhaps also in wikitext for wikicontent?
Perhaps also when we display a revision-diff = "Difference between revisions"?
Even in VisualEditor?
**How to use** these display ways?
Each time when we edit a script or a module or a template and then clic on "show changes".
Also when we clic "Preview" to see the effect on a test page?
Highlight the comparison to the last identified change or between the 2 last clicks on "Preview".
Begin to offer these ways for codes panels, and later extend them to other places?
**When to activate** these ways and modes?
When the user chooses these ways for each code panel?
When the user chooses them in his preferences?