2016-07-15 12:39:15 +02:00
|
|
|
/*---------------------------------------------------------------------------------------------
|
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
|
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
2016-12-30 11:17:41 +01:00
|
|
|
import { MotionState, Motion } from './motions';
|
2016-07-15 12:39:15 +02:00
|
|
|
|
|
|
|
|
export enum Mode {
|
|
|
|
|
INSERT,
|
|
|
|
|
NORMAL,
|
|
|
|
|
REPLACE
|
|
|
|
|
}
|
|
|
|
|
|
2016-08-04 18:08:09 +02:00
|
|
|
export interface ModifierKeys {
|
2018-11-08 10:13:29 +01:00
|
|
|
ctrl?: boolean;
|
|
|
|
|
alt?: boolean;
|
|
|
|
|
shifit?: boolean;
|
2016-08-04 18:08:09 +02:00
|
|
|
}
|
|
|
|
|
|
2016-07-15 12:39:15 +02:00
|
|
|
export class DeleteRegister {
|
2016-12-30 11:17:41 +01:00
|
|
|
public isWholeLine: boolean;
|
|
|
|
|
public content: string;
|
2016-07-15 12:39:15 +02:00
|
|
|
|
2016-12-30 11:17:41 +01:00
|
|
|
constructor(isWholeLine: boolean, content: string) {
|
2016-07-15 12:39:15 +02:00
|
|
|
this.isWholeLine = isWholeLine;
|
|
|
|
|
this.content = content;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IController {
|
|
|
|
|
motionState: MotionState;
|
|
|
|
|
|
|
|
|
|
setMode(mode: Mode): void;
|
2016-12-30 11:17:41 +01:00
|
|
|
setVisual(newVisual: boolean): void;
|
2016-07-15 12:39:15 +02:00
|
|
|
findMotion(input: string): Motion;
|
|
|
|
|
isMotionPrefix(input: string): boolean;
|
|
|
|
|
|
2016-12-30 11:17:41 +01:00
|
|
|
setDeleteRegister(register: DeleteRegister): void;
|
2016-07-15 12:39:15 +02:00
|
|
|
getDeleteRegister(): DeleteRegister;
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-25 16:59:01 +02:00
|
|
|
export abstract class AbstractCommandDescriptor {
|
|
|
|
|
|
|
|
|
|
public abstract createCommand(args?: any): Command;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-15 12:39:15 +02:00
|
|
|
export interface Command {
|
2018-11-08 10:13:29 +01:00
|
|
|
commandId: string;
|
|
|
|
|
args?: any[];
|
2016-12-30 11:17:41 +01:00
|
|
|
}
|