<commit_before>// code editor things

Template.code.helpers({

  nulldoc: function() {
    return Session.equals('document', null);
  }

});

Template.editor.helpers({

  docid: function() {
    return Session.get('document');
  },
  configAce: function() {
    return function(ace) {
      ace.setTheme('ace/theme/monokai');
      ace.setShowPrintMargin(false);
      ace.getSession().setUseWrapMode(true);
      //different style colors based on filename
      //return filename.split('.').pop();
    };
  }

});

Template.filename.helpers({

  rename: function() {
    return Session.equals('renaming', true);
  },
  title: function() {
    var ref;
    return (ref = Files.findOne(this + '')) != null ? ref.title : void 0;
  }

});

Template.filename.events = {<commit_msg>trying to add formatting<commit_after>// code editor things

Template.code.helpers({

  nulldoc: function() {
    return Session.equals('document', null);
  }

});

Template.editor.helpers({

  docid: function() {
    return Session.get('document');
  },
  configAce: function() {
    return function(ace) {

      // default theme
      ace.setTheme('ace/theme/monokai');
      ace.setShowPrintMargin(false);
      ace.getSession().setUseWrapMode(true);

      //different style colors based on filename
      var modelist = ace.require('ace/ext/modelist');
      var fileId = Session.get('document');
      var filePath = Files.findOne( fileId );
      var mode = modelist.getModeForPath(filePath).mode
      editor.session.setMode(mode);
    };
  }

});

Template.filename.helpers({

  rename: function() {
    return Session.equals('renaming', true);
  },
  title: function() {
    var ref;
    return (ref = Files.findOne(this + '')) != null ? ref.title : void 0;
  }

});

Template.filename.events = {
{'fraction_non_alphanumeric': 0.1586322869955157, 'fraction_numerical': 0.0011210762331838565, 'mean_word_length': 3.1129032258064515, 'pattern_counts': {'":': 0, '<': 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': '6161134', 'n_tokens_mistral': 572, 'n_tokens_neox': 566, 'n_words': 113}