<commit_before>'use strict';

const KeyListener = require('./keyListener.js');

// Map input text to either 1) an editor action or 2) to false (if the input is invalid).
const inputHandlers = {
    'ins':          (params) => ({type: 'INSERT', text: params.join(' ')}),
    'del':          () => ({type: 'DELETE_FORWARD_CHAR'}),    
    'del-back':     () => ({type: 'DELETE_BACK_CHAR'}),
    'goto':         (params) => params.length > 0 ? {type: 'MOVE_TO_POS', line: +params[0], col: (+params[1] || 1)} : false,
    'new-pane':     (params) => params.length === 0 ? {type: 'NEW_PANE'} : {type: 'NEW_PANE', name: params[0]},
    'switch-pane':  (params) => params.length === 0 ? {type: 'SWITCH_PANE'} : {type: 'SWITCH_PANE', name: params[0]},
    'switch-up':    () => ({type: 'SWITCH_PANE_GROUP_UP'}),
    'switch-down':  () => ({type: 'SWITCH_PANE_GROUP_DOWN'}),
    'switch-left':  () => ({type: 'SWITCH_PANE_GROUP_LEFT'}),
    'switch-right': () => ({type: 'SWITCH_PANE_GROUP_RIGHT'}),
    'split-up':     () => ({type: 'SPLIT_PANE_GROUP_UP'}),
    'split-down':   () => ({type: 'SPLIT_PANE_GROUP_DOWN'}),
    'split-left':   () => ({type: 'SPLIT_PANE_GROUP_LEFT'}),
    'split-right':  () => ({type: 'SPLIT_PANE_GROUP_RIGHT'}),
    'split-horiz':  () => ({type: 'SPLIT_PANE_GROUP_HORIZONTAL'}),
    'close-pane':   (params) => params.length === 0 ? {type: 'CLOSE_PANE'} : {type: 'CLOSE_PANE', name: params[0]},
    'close-all':    () => ({type: 'CLOSE_ALL'}),
    'close-group':  () => ({type: 'CLOSE_PANE_GROUP'}),
    'show-tabs':    () => ({type: 'SHOW_TABS'}),
    'hide-tabs':    () => ({type: 'HIDE_TABS'}),
    'show-gutter':  () => ({type: 'SHOW_GUTTER'}),
    'hide-gutter':  () => ({type: 'HIDE_GUTTER'}),
    'show-ctxt':    () => ({type: 'SHOW_CONTEXT'}),
    'hide-ctxt':    () => ({type: 'HIDE_CONTEXT'})
};

const defaults = {
    inputHandlers,<commit_msg>Remove unused action.<commit_after>'use strict';

const KeyListener = require('./keyListener.js');

// Map input text to either 1) an editor action or 2) to false (if the input is invalid).
const inputHandlers = {
    'ins':          (params) => ({type: 'INSERT', text: params.join(' ')}),
    'del':          () => ({type: 'DELETE_FORWARD_CHAR'}),    
    'del-back':     () => ({type: 'DELETE_BACK_CHAR'}),
    'goto':         (params) => params.length > 0 ? {type: 'MOVE_TO_POS', line: +params[0], col: (+params[1] || 1)} : false,
    'new-pane':     (params) => params.length === 0 ? {type: 'NEW_PANE'} : {type: 'NEW_PANE', name: params[0]},
    'switch-pane':  (params) => params.length === 0 ? {type: 'SWITCH_PANE'} : {type: 'SWITCH_PANE', name: params[0]},
    'switch-up':    () => ({type: 'SWITCH_PANE_GROUP_UP'}),
    'switch-down':  () => ({type: 'SWITCH_PANE_GROUP_DOWN'}),
    'switch-left':  () => ({type: 'SWITCH_PANE_GROUP_LEFT'}),
    'switch-right': () => ({type: 'SWITCH_PANE_GROUP_RIGHT'}),
    'split-up':     () => ({type: 'SPLIT_PANE_GROUP_UP'}),
    'split-down':   () => ({type: 'SPLIT_PANE_GROUP_DOWN'}),
    'split-left':   () => ({type: 'SPLIT_PANE_GROUP_LEFT'}),
    'split-right':  () => ({type: 'SPLIT_PANE_GROUP_RIGHT'}),
    'close-pane':   (params) => params.length === 0 ? {type: 'CLOSE_PANE'} : {type: 'CLOSE_PANE', name: params[0]},
    'close-all':    () => ({type: 'CLOSE_ALL'}),
    'close-group':  () => ({type: 'CLOSE_PANE_GROUP'}),
    'show-tabs':    () => ({type: 'SHOW_TABS'}),
    'hide-tabs':    () => ({type: 'HIDE_TABS'}),
    'show-gutter':  () => ({type: 'SHOW_GUTTER'}),
    'hide-gutter':  () => ({type: 'HIDE_GUTTER'}),
    'show-ctxt':    () => ({type: 'SHOW_CONTEXT'}),
    'hide-ctxt':    () => ({type: 'HIDE_CONTEXT'})
};

const defaults = {
    inputHandlers,
{'fraction_non_alphanumeric': 0.25074384636191505, 'fraction_numerical': 0.0064917500676223965, 'mean_word_length': 3.605230386052304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 52, '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': '7616381', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1445, 'n_words': 264}