Class Neovim::Buffer
In: lib/neovim/buffer.rb
lib/neovim/ruby_provider/buffer_ext.rb
Parent: RemoteObject

Class representing an nvim buffer.

The methods documented here were generated using NVIM v0.1.7

Methods

[]   []   []=   active?   append   count   count   current   delete   length   line   line=   line_number   lines   lines=   name   number   range   range=  

Public Class methods

Public Instance methods

Get the given line (1-indexed).

@param index [Integer] @return [String]

Set the given line (1-indexed).

@param index [Integer] @param str [String] @return [String]

Determine if the buffer is active.

@return [Boolean]

Append a line after the given line (1-indexed).

To maintain backwards compatibility with vim, the cursor is forced back to its previous position after inserting the line.

@param index [Integer] @param str [String] @return [String]

Get the number of lines.

@return [Integer]

Delete the given line (1-indexed).

@param index [Integer] @return [void]

Get the number of lines.

@return [Integer]

Get the current line of an active buffer.

@return [String, nil]

Set the current line of an active buffer.

@param str [String] @return [String, nil]

Get the current line number of an active buffer.

@return [Integer, nil]

A LineRange object representing the buffer‘s lines.

@return [LineRange] @see LineRange

Replace all the lines of the buffer.

@param strs [Array<String>] The replacement lines @return [Array<String>]

Get the buffer name.

@return [String]

Get the buffer index.

@return [Integer]

A LineRange object representing the buffer‘s selection range.

@return [LineRange] @see LineRange

Set the buffer‘s current selection range.

@param _range [Range] The replacement range @return [LineRange] @see LineRange

[Validate]