Newline Processor Options

The NewlineProcessorOptions interface specifies the options that can be passed to the default newline processor.

Please see Processors for more information.

Hierarchy

  • NewlineProcessorOptions

Properties

incrementIndentationOn: RegExp

The indentOn option specifies a regular expression that is used to determine whether the editor should indent the new line further when the user presses the enter key.

Usually this regex matches with opening brackets and parentheses. When the user presses newline and the cursor immediately follows an open bracket, we want to indent the next line further.

Default: /[({[]$/

moveToNewLine: RegExp

The moveToNewLine option specifies a regular expression that is used to determine whether the editor should move the text after the cursor to the beginning of the next line when the user presses the enter key. This is used for closing brackets and parentheses when the user presses enter and the next character is a closing bracket or parenthesis.

Default: /^[)}\]]/

tab: string

The tab option specifies the string that is inserted when the user presses the tab key. This value is used by the newline processor to indent new lines which require additional indentation correctly.

Default: ' ' (two spaces)

Generated using TypeDoc