Class Neovim::Client
In: lib/neovim/client.rb
Parent: Object

Client to a running nvim instance. The interface is generated at runtime via the vim_get_api_info RPC call. Some methods return RemoteObject subclasses (i.e. Buffer, Window, or Tabpage), which similarly have dynamically generated interfaces.

The methods documented here were generated using NVIM v0.1.7

@see Buffer @see Window @see Tabpage

Methods

Attributes

channel_id  [R] 
session  [R] 

Public Class methods

Public Instance methods

Access to objects belonging to the current nvim context.

@return [Current] @example Get the current buffer

  client.current.buffer

@example Set the current line

  client.current.line = "New line"

@see Current

Evaluate the VimL expression (alias for vim_eval).

@param expr [String] A VimL expression. @return [Object] @example Return a list from VimL

  client.evaluate('[1, 2]') # => [1, 2]

Display a message.

@param string [String] The message. @return [void]

Intercept method calls and delegate to appropriate RPC methods.

Extend methods to include RPC methods.

Set an option.

@overload set_option(key, value)

  @param [String] key
  @param [String] value

@overload set_option(optstr)

  @param [String] optstr

@example Set the timeoutlen option

  client.set_option("timeoutlen", 0)
  client.set_option("timeoutlen=0")

[Validate]