<commit_before>"use strict";

var interactivate = require("./interactivate")

var CodeMirror = require("./code-mirror")
var activeLine = require("./code-mirror/active-line")
var persist = require("./code-mirror/persist")

var editor = CodeMirror(document.body, {
  electricChars: true,
  autofocus: true,
  theme: "solarized dark",
  mode: "javascript",
  extraKeys: {
    "Tab": function indent(editor) {
      if (!editor.getOption("indentWithTabs")) {
        var size = editor.getOption("indentUnit")
        var indentation = Array(size + 1).join(" ")
        editor.replaceSelection(indentation, "end")
      }
    }
  }
})

// Enable interactive mode for this editor.
interactivate(editor)
// Enable active line highlighting.
activeLine(editor)
// Enable persistence of the editor buffer.
persist(editor)<commit_msg>Export editor.<commit_after>"use strict";

var interactivate = require("./interactivate")

var CodeMirror = require("./code-mirror")
var activeLine = require("./code-mirror/active-line")
var persist = require("./code-mirror/persist")

var editor = CodeMirror(document.body, {
  electricChars: true,
  autofocus: true,
  theme: "solarized dark",
  mode: "javascript",
  extraKeys: {
    "Tab": function indent(editor) {
      if (!editor.getOption("indentWithTabs")) {
        var size = editor.getOption("indentUnit")
        var indentation = Array(size + 1).join(" ")
        editor.replaceSelection(indentation, "end")
      }
    }
  }
})

global.editor = editor

// Enable interactive mode for this editor.
interactivate(editor)
// Enable active line highlighting.
activeLine(editor)
// Enable persistence of the editor buffer.
persist(editor)
{'fraction_non_alphanumeric': 0.13943746259724715, 'fraction_numerical': 0.0011968880909634949, 'mean_word_length': 3.888888888888889, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '541760', 'n_tokens_mistral': 507, 'n_tokens_neox': 493, 'n_words': 122}