case BACKWARD_CHAR: if (to == null) { return EditorAction.LEFT.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_PREV_CHAR.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_PREV_CHAR.repeat(count).then(VI_INSERT); } else if (to == 'y') { return EditorAction.RIGHT.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_NEXT_CHAR.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_NEXT_CHAR.repeat(count).then(VI_INSERT); } else if (to == 'y') { throw new UnsupportedOperationException("Not yet handled"); return EditorAction.MOVE_NEXT_WORD_AT_BEGINNING.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_UNTIL_NEXT_WORD.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_NEXT_WORD.repeat(count).then(VI_INSERT); } else { return super.on(keyStroke); return EditorAction.MOVE_PREV_WORD_AT_END.repeat(count).then(VI_MOVE); } else { super.on(keyStroke);
case BACKWARD_CHAR: if (to == null) { return EditorAction.LEFT.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_PREV_CHAR.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_PREV_CHAR.repeat(count).then(VI_INSERT); } else if (to == 'y') { return EditorAction.RIGHT.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_NEXT_CHAR.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_NEXT_CHAR.repeat(count).then(VI_INSERT); } else if (to == 'y') { throw new UnsupportedOperationException("Not yet handled"); return EditorAction.MOVE_NEXT_WORD_AT_BEGINNING.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_UNTIL_NEXT_WORD.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_NEXT_WORD.repeat(count).then(VI_INSERT); } else { return super.on(keyStroke); return EditorAction.MOVE_PREV_WORD_AT_END.repeat(count).then(VI_MOVE); } else { super.on(keyStroke);
case BACKWARD_CHAR: if (to == null) { return EditorAction.LEFT.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_PREV_CHAR.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_PREV_CHAR.repeat(count).then(VI_INSERT); } else if (to == 'y') { return EditorAction.RIGHT.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_NEXT_CHAR.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_NEXT_CHAR.repeat(count).then(VI_INSERT); } else if (to == 'y') { throw new UnsupportedOperationException("Not yet handled"); return EditorAction.MOVE_NEXT_WORD_AT_BEGINNING.repeat(count).then(VI_MOVE); } else if (to == 'd') { return EditorAction.DELETE_UNTIL_NEXT_WORD.repeat(count).then(VI_MOVE); } else if (to == 'c') { return EditorAction.DELETE_NEXT_WORD.repeat(count).then(VI_INSERT); } else { return super.on(keyStroke); return EditorAction.MOVE_PREV_WORD_AT_END.repeat(count).then(VI_MOVE); } else { super.on(keyStroke);