<commit_before>import React, { Component } from "react";
import { inject, observer, PropTypes as MobxPropTypes } from "mobx-react";
import CodeMirrorComponent from "react-codemirror";

@inject(["editorStore"])
@observer
class EditorEditable extends Component {
    static propTypes = {
        editorStore: MobxPropTypes.observableObject,
    }

    state = {
        options: {
            mode: "gfm",
            theme: "dark",

            styleActiveLine: true,
            lineNumbers: false,
            lineWrapping: true,

            autofocus: true,
            scrollbarStyle: "overlay",
            scrollPastEnd: true,

            tabSize: 4,
            indentUnit: 4,
            indentWithTabs: true,
            autoCloseBrackets: true,
        },
    }

    editorDidChange = (value) => {
        this.props.editorStore.changeContent(value);
    }

    render() {
        return (
            <div className="editor-editable qilin-panel">
                <CodeMirrorComponent
                    options={this.state.options}
                    value={this.props.editorStore.content}
                    onChange={this.editorDidChange}
                />
            </div>
        );
    }
}

export default EditorEditable;<commit_msg>:heavy_plus_sign: Add SublimeText key map<commit_after>import React, { Component } from "react";
import { inject, observer, PropTypes as MobxPropTypes } from "mobx-react";
import CodeMirrorComponent from "react-codemirror";

@inject(["editorStore"])
@observer
class EditorEditable extends Component {
    static propTypes = {
        editorStore: MobxPropTypes.observableObject,
    }

    state = {
        options: {
            mode: "gfm",
            theme: "dark",
            autofocus: true,
            lineNumbers: false,
            lineWrapping: true,
            styleActiveLine: true,
            scrollbarStyle: "overlay",
            scrollPastEnd: true,
            indentUnit: 4,
            autoCloseBrackets: true,
            keyMap: "sublime",
        },
    }

    editorDidChange = (value) => {
        this.props.editorStore.changeContent(value);
    }

    render() {
        return (
            <div className="editor-editable qilin-panel">
                <CodeMirrorComponent
                    options={this.state.options}
                    value={this.props.editorStore.content}
                    onChange={this.editorDidChange}
                />
            </div>
        );
    }
}

export default EditorEditable;
{'fraction_non_alphanumeric': 0.09880478087649402, 'fraction_numerical': 0.001195219123505976, 'mean_word_length': 1.7962138084632517, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '7238264', 'n_tokens_mistral': 694, 'n_tokens_neox': 657, 'n_words': 139}