Class: Neovim::Current

Inherits:
Object
  • Object
show all
Defined in:
lib/neovim/current.rb

Overview

Support for client.current chaining.

Instance Method Summary collapse

Constructor Details

#initialize(session) ⇒ Current

Returns a new instance of Current.



9
10
11
# File 'lib/neovim/current.rb', line 9

def initialize(session)
  @session = session
end

Instance Method Details

#bufferBuffer

Returns:



25
26
27
# File 'lib/neovim/current.rb', line 25

def buffer
  @session.request(:vim_get_current_buffer)
end

#buffer=(buffer) ⇒ Buffer, Fixnum

Parameters:

  • buffer (Buffer, Fixnum)

    The target buffer or index.

Returns:



31
32
33
# File 'lib/neovim/current.rb', line 31

def buffer=(buffer)
  @session.request(:vim_set_current_buffer, buffer)
end

#lineString

Returns:

  • (String)


14
15
16
# File 'lib/neovim/current.rb', line 14

def line
  @session.request(:vim_get_current_line)
end

#line=(line) ⇒ String

Parameters:

  • line (String)

    The target line contents.

Returns:

  • (String)


20
21
22
# File 'lib/neovim/current.rb', line 20

def line=(line)
  @session.request(:vim_set_current_line, line)
end

#tabpageTabpage

Returns:



47
48
49
# File 'lib/neovim/current.rb', line 47

def tabpage
  @session.request(:vim_get_current_tabpage)
end

#tabpage=(tabpage) ⇒ Tabpage, Fixnum

Parameters:

  • tabpage (Tabpage, Fixnum)

    The target tabpage or index.

Returns:



53
54
55
# File 'lib/neovim/current.rb', line 53

def tabpage=(tabpage)
  @session.request(:vim_set_current_tabpage, tabpage)
end

#windowWindow

Returns:



36
37
38
# File 'lib/neovim/current.rb', line 36

def window
  @session.request(:vim_get_current_window)
end

#window=(window) ⇒ Window, Fixnum

Parameters:

  • window (Window, Fixnum)

    The target window or index.

Returns:



42
43
44
# File 'lib/neovim/current.rb', line 42

def window=(window)
  @session.request(:vim_set_current_window, window)
end