Skip to main content
Version: Next

RsvimOpt

The Rsvim.opt object for global editor options.

Example

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

Accessors

wrap

Get Signature

get wrap(): boolean;

Get the wrap option.

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.

See
Example
// Get the 'wrap' option.
const value = Rsvim.opt.wrap;
// Set the 'wrap' option.
Rsvim.opt.wrap = true;
Default Value

true

Returns

boolean

Set Signature

set wrap(value): void;

Set the wrap option.

Throws

Error if value is not a boolean value.

Parameters
ParameterTypeDescription

value

boolean

The wrap option.

Returns

void


lineBreak

Get Signature

get lineBreak(): boolean;

Experimental

Get the line-break option.

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. If 'breakindent' is set, line is visually indented. Then, the value of 'showbreak' is used to put in front of wrapped lines. This option is not used when the wrap option is false.

See
Example
// Get the 'lineBreak' option.
const value = Rsvim.opt.lineBreak;
// Set the 'lineBreak' option.
Rsvim.opt.lineBreak = true;
Default Value

false

Returns

boolean

Set Signature

set lineBreak(value): void;

Set the line-break option.

Throws

Error if value is not a boolean value.

Parameters
ParameterTypeDescription

value

boolean

The line-break option.

Returns

void