forked from Silverquark/dance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
54 lines (48 loc) · 810 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* Direction of an operation.
*/
export const enum Direction {
/**
* Forward direction (`1`).
*/
Forward = 1,
/**
* Backward direction (`-1`).
*/
Backward = -1,
}
/**
* Behavior of a shift.
*/
export const enum Shift {
/**
* Jump to the position.
*/
Jump,
/**
* Select to the position.
*/
Select,
/**
* Extend to the position.
*/
Extend,
}
/**
* Selection behavior of an operation.
*/
export const enum SelectionBehavior {
/**
* VS Code-like caret selections.
*/
Caret = 1,
/**
* Kakoune-like character selections.
*/
Character = 2,
}
export const Forward = Direction.Forward,
Backward = Direction.Backward,
Jump = Shift.Jump,
Select = Shift.Select,
Extend = Shift.Extend;