NSIS mode for CodeMirror 5

Usage no npm install needed!

<script type="module">
  import codemirrorNsis from '';



npm npm CI David

A mode for NSIS to use with CodeMirror, the versatile text editor implemented in JavaScript for the browser.

Demo Time 🙌


Use your preferred Node package manager to install the mode

$ yarn add codemirror-nsis || npm install codemirror-nsis

Alternatively, you can clone this repository

$ git clone


Example usage on website

<!DOCTYPE html>
  <!-- Import CodeMirror styles -->
  <link rel="stylesheet" href="">
  <!-- Add Textarea -->
  <textarea id="editor"></textarea>

  <!-- Import CodeMirror library -->
  <script defer src=""></script>

  <!-- Import NSIS mode -->
  <script defer type="module" src=""></script>
  <script defer type="nomodule" src=""></script>

  <!-- Initialize CodeMirror -->
  <script type="text/javascript">
    const editor = document.getElementById('editor');
    const options = {
      lineNumbers: true,
      mode: 'nsis'

    CodeMirror.fromTextArea(editor, options);

Note: If you want to load CodeMirror from a CDN, make sure to specify a specific version for better performance – the example above doesn't to keep it simple.


Released under The MIT License