Skip to main content
Version: Next

RsvimOpt

The Rsvim.opt global object for global editor options.

Example

// Create a alias to 'Rsvim.opt'.
const opt = Rsvim.opt;

Accessors

wrap

Get Signature

get wrap(): boolean;

Get the wrap option. This option is also known as line wrap.

Local to Window.

This option changes how text is displayed.

When true (on), lines longer than the width of the window will wrap and displaying continues on the next line. When false (off) lines will not wrap and only part of long lines will be displayed. When the cursor is moved to a part that is not shown, the screen will scroll horizontally.

The line will be broken in the middle of a word if necessary. See lineBreak to get the break at a word boundary.

Default Value

true

Example
// Get the 'wrap' option.
const value = Rsvim.opt.wrap;
Returns

boolean

Set Signature

set wrap(value): void;

Set the wrap option.

Throws

Throws Error if value is not a boolean value.

Example
// Set the 'wrap' option.
Rsvim.opt.wrap = true;
Parameters
ParameterTypeDescription

value

boolean

The wrap option.

Returns

void


lineBreak

Get Signature

get lineBreak(): boolean;

Get the line-break option. This options is also known as word wrap.

Local to Window.

If true (on), Vim will wrap long lines by a word boundary rather than at the last character that fits on the screen. It only affects the way the file is displayed, not its contents.

This option is not used when the wrap option is false.

Default Value

false

Example
// Get the 'lineBreak' option.
const value = Rsvim.opt.lineBreak;
Returns

boolean

Set Signature

set lineBreak(value): void;

Set the line-break option.

Throws

Throws Error if value is not a boolean value.

Example
// Set the 'lineBreak' option.
Rsvim.opt.lineBreak = true;
Parameters
ParameterTypeDescription

value

boolean

The line-break option.

Returns

void