Class: Neovim::Window
- Inherits:
-
RemoteObject
- Object
- RemoteObject
- Neovim::Window
- Defined in:
- lib/neovim/ruby_provider.rb,
lib/neovim/window.rb
Overview
Make VIM::Window.current
return the current buffer.
Instance Attribute Summary
Attributes inherited from RemoteObject
Class Method Summary collapse
Instance Method Summary collapse
-
#buffer ⇒ Buffer
Get the buffer displayed in the window.
-
#cursor ⇒ Array(Fixnum, Fixnum)
Get the cursor coordinates.
-
#cursor=(coords) ⇒ Array(Fixnum, Fixnum)
Set the cursor coodinates.
- #get_buffer ⇒ Buffer
- #get_cursor ⇒ Array<Fixnum>
- #get_height ⇒ Fixnum
- #get_option(name) ⇒ Object
- #get_position ⇒ Array<Fixnum>
- #get_tabpage ⇒ Tabpage
- #get_var(name) ⇒ Object
- #get_width ⇒ Fixnum
-
#height ⇒ Fixnum
Get the height of the window.
-
#height=(height) ⇒ Fixnum
Set the height of the window.
- #is_valid ⇒ Boolean
- #set_cursor(pos) ⇒ void
- #set_height(height) ⇒ void
- #set_option(name, value) ⇒ void
- #set_var(name, value) ⇒ Object
- #set_width(width) ⇒ void
-
#width ⇒ Fixnum
Get the width of the window.
-
#width=(width) ⇒ Fixnum
Set the width of the window.
Methods inherited from RemoteObject
#==, #initialize, #method_missing, #methods, #respond_to?, #to_msgpack
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
.current ⇒ Object
24 25 26 |
# File 'lib/neovim/ruby_provider.rb', line 24 def self.current ::VIM.current.window end |
Instance Method Details
#buffer ⇒ Buffer
Get the buffer displayed in the window
16 17 18 |
# File 'lib/neovim/window.rb', line 16 def buffer get_buffer end |
#cursor ⇒ Array(Fixnum, Fixnum)
Get the cursor coordinates
9 10 11 |
# File 'lib/neovim/window.rb', line 9 def cursor @cursor ||= Cursor.new(self) end |
#cursor=(coords) ⇒ Array(Fixnum, Fixnum)
Set the cursor coodinates
63 64 65 |
# File 'lib/neovim/window.rb', line 63 def cursor=(coords) set_cursor(coords) end |
#get_cursor ⇒ Array<Fixnum>
|
# File 'lib/neovim/window.rb', line 69
|
#get_height ⇒ Fixnum
|
# File 'lib/neovim/window.rb', line 69
|
#get_option(name) ⇒ Object
|
# File 'lib/neovim/window.rb', line 69
|
#get_position ⇒ Array<Fixnum>
|
# File 'lib/neovim/window.rb', line 69
|
#get_var(name) ⇒ Object
|
# File 'lib/neovim/window.rb', line 69
|
#get_width ⇒ Fixnum
|
# File 'lib/neovim/window.rb', line 69
|
#height ⇒ Fixnum
Get the height of the window
23 24 25 |
# File 'lib/neovim/window.rb', line 23 def height get_height end |
#height=(height) ⇒ Fixnum
Set the height of the window
31 32 33 34 |
# File 'lib/neovim/window.rb', line 31 def height=(height) set_height(height) height end |
#is_valid ⇒ Boolean
|
# File 'lib/neovim/window.rb', line 69
|
#set_cursor(pos) ⇒ void
This method returns an undefined value.
|
# File 'lib/neovim/window.rb', line 69
|
#set_height(height) ⇒ void
This method returns an undefined value.
|
# File 'lib/neovim/window.rb', line 69
|
#set_option(name, value) ⇒ void
This method returns an undefined value.
|
# File 'lib/neovim/window.rb', line 69
|
#set_var(name, value) ⇒ Object
|
# File 'lib/neovim/window.rb', line 69
|
#set_width(width) ⇒ void
This method returns an undefined value.
|
# File 'lib/neovim/window.rb', line 69
|
#width ⇒ Fixnum
Get the width of the window
39 40 41 |
# File 'lib/neovim/window.rb', line 39 def width get_width end |
#width=(width) ⇒ Fixnum
Set the width of the window
47 48 49 50 |
# File 'lib/neovim/window.rb', line 47 def width=(width) set_width(width) width end |