Class: Neovim::Window

Inherits:
RemoteObject show all
Defined in:
lib/neovim/remote_object.rb

Constant Summary collapse

OPTION_PARAM =
:win

Constants inherited from RemoteObject

RemoteObject::TRANSFER

Instance Attribute Summary

Attributes inherited from RemoteObject

#client, #index

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RemoteObject

#==, #call_api, #call_obj, from_mpdata, #initialize, #inspect, #method_missing, #methods, new, plain_new, #respond_to_missing?, #to_mpdata, type, #type

Methods included from OptionAccess

#get_option, #option_params, #set_option

Constructor Details

This class inherits a constructor from Neovim::RemoteObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Neovim::RemoteObject

Class Method Details

.[](i) ⇒ Object



33
# File 'lib/neovim/ruby_provider.rb', line 33

def [] i    ; $vim.get_current_tabpage.list_wins[ i]  ; end

.countObject



32
# File 'lib/neovim/ruby_provider.rb', line 32

def count   ; $vim.get_current_tabpage.list_wins.size ; end

.currentObject



31
# File 'lib/neovim/ruby_provider.rb', line 31

def current ; $vim.get_current_win                    ; end

Instance Method Details

#bufferObject



314
# File 'lib/neovim/remote_object.rb', line 314

def buffer ; call_obj :get_buf ; end

#cursorObject



324
# File 'lib/neovim/remote_object.rb', line 324

def cursor     ; call_obj :get_cursor     ; end

#cursor=(yx) ⇒ Object



325
# File 'lib/neovim/remote_object.rb', line 325

def cursor= yx ; call_obj :set_cursor, yx ; end

#heightObject



316
# File 'lib/neovim/remote_object.rb', line 316

def height    ; call_obj :get_height    ; end

#height=(n) ⇒ Object



317
# File 'lib/neovim/remote_object.rb', line 317

def height= n ; call_obj :set_height, n ; end

#lineObject



322
# File 'lib/neovim/remote_object.rb', line 322

def line       ; cursor.first ; end

#numberObject



312
# File 'lib/neovim/remote_object.rb', line 312

def number ; call_obj :get_number ; end

#save_cursorObject



327
328
329
330
331
# File 'lib/neovim/remote_object.rb', line 327

def save_cursor
  c = cursor
  yield
  self.cursor = c
end

#widthObject



319
# File 'lib/neovim/remote_object.rb', line 319

def width    ; call_obj :get_width    ; end

#width=(n) ⇒ Object



320
# File 'lib/neovim/remote_object.rb', line 320

def width= n ; call_obj :set_width, n ; end