Help:CodeMirror
From Liquipedia Commons Wiki
Liquipedia has various editing expriences available. One of the options is a full blown code editor in the form of the CodeMirror editor. To use the CodeMirror editor, go to your preferences and enable it in the "Editing" section under the CodeMirror heading.
The CodeMirror editor provides full syntax highlighting for Wikicode, Lua, JavaScript and CSS. On top of that, it provides a number of interesting hotkeys:
- Press F11 whilst the editor is focused to make the editor take the entire space of the tab (this mode can be disabled again by pressing F11 again or by pressing Esc)
- Press Alt + Left-Click on a template name to open the template page in a new tab
- Press Alt + Left-Click on a module name used in a call to invoke to open the module page in a new tab. Also works for module names passed to
{{#invoke:Lua|invoke}}. - Press Alt + Left-Click on a wiki link to open the link page in a new tab
- Left-Click on a line number on the left side of the editor to create a link that automatically scrolls the editor to the selected line
- Press Ctrl + Left-Click anywhere in the editor to add a second cursor allowing you to work in multiple lines at once
Based on the same special link syntax Scribunto Lua errors will also make the editor jump to the correct line from the Lua stacktrace popups.