UNPKG

931 BTypeScriptView Raw
1import "../../";
2
3export interface HardwrapOptions {
4 column?: number | undefined;
5 paragraphStart?: RegExp | undefined;
6 paragraphEnd?: RegExp | undefined;
7 wrapOn?: RegExp | undefined;
8 killTrailingSpace?: boolean | undefined;
9 forceBreak?: boolean | undefined;
10}
11
12declare module "../../" {
13 interface CommandActions {
14 wrapLines(cm: Editor): void;
15 }
16
17 interface Editor {
18 /** Wraps the paragraph at the given position. If pos is not given, it defaults to the cursor position. */
19 wrapParagraph(pos?: Position, options?: HardwrapOptions): void;
20 /** Wraps the given range as one big paragraph. */
21 wrapRange(from: Position, to: Position, options?: HardwrapOptions): void;
22 /** Wraps the paragraphs in (and overlapping with) the given range individually. */
23 wrapParagraphsInRange(from: Position, to: Position, options?: HardwrapOptions): void;
24 }
25}