User:Nardog/CodeEditorAssist

Did you know that pressing Ctrl in the code editor for CSS, JavaScript, JSON, Lua, and edit filters opens a configuration panel where you can customize the highlighting theme, keybindings, font size, wrapping style, cursor style, indentation method, undo buffers, and even live autocompletion? I know, right? Or you did but you wished you could have kept your preferences across pages? Right, right. Well, you've come to the right place.

CodeEditorAssist will allow you to save your code editor preferences and automatically apply them every time you open the editor. It also adds a handy settings button to the code editor toolbar.

Installation
Add the following to your common.js or global.js:

Or you may enable the script installer in and click "Install" in the infobox on this page.

Saving settings
Settings are saved to your global preferences. While saved settings are automatically loaded every time you open a page with the code editor, you have to hit Save in order to save them in the first place (so any changes made to the settings afterwards will not be saved, including through the default toggle buttons on the toolbar). The options "Mode" and "Read-only" are not saved.