<commit_before>'use babel';

import { CompositeDisposable } from 'atom';

export default {
  activate(state) {

    this.subscriptions = new CompositeDisposable();

    let editor = atom.workspace.getActiveTextEditor();

    this.subscriptions.add(

      editor.onDidInsertText((e) => {
        if (e.text === '{}') {
          let curRange = editor.getCursorBufferPosition();
          let range = [[curRange.row, curRange.column - 3], [curRange.row, curRange.column + 2]]
          if (editor.getTextInBufferRange(range) === '{{}}') {
            editor.setTextInBufferRange(range, '{{  }}');
            editor.getLastCursor().moveLeft(2);
          }
        }
      })

    );
  },

  deactivate() {
    this.subscriptions.dispose();
  }
};<commit_msg>change observation<commit_after>'use babel';

import { CompositeDisposable } from 'atom';

export default {
  activate(state) {

    this.subscriptions = new CompositeDisposable();

    this.subscriptions.add(atom.workspace.observeTextEditors(editor => {
      this.subscriptions.add(
        editor.onDidInsertText((e) => {
          if (e.text === '{}') {
            let curRange = editor.getCursorBufferPosition();
            let range = [[curRange.row, curRange.column - 3], [curRange.row, curRange.column + 2]]
            if (editor.getTextInBufferRange(range) === '{{}}') {
              editor.setTextInBufferRange(range, '{{  }}');
              editor.getLastCursor().moveLeft(2);
            }
          }
        });
      );
    }));

  },

  deactivate() {
    this.subscriptions.dispose();
  }
};
{'fraction_non_alphanumeric': 0.1578612348822406, 'fraction_numerical': 0.0038192234245703373, 'mean_word_length': 2.47787610619469, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '6394881', 'n_tokens_mistral': 485, 'n_tokens_neox': 467, 'n_words': 71}