Class: Neovim::Window
- Inherits:
-
RemoteObject
- Object
- RemoteObject
- Neovim::Window
- Defined in:
- lib/neovim/window.rb,
lib/neovim/ruby_provider/window_ext.rb
Overview
Class representing an nvim window.
The methods documented here were generated using NVIM v0.2.2
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(Integer, Integer)
Get the cursor coordinates.
-
#cursor=(coords) ⇒ Array(Integer, Integer)
Set the cursor coodinates.
-
#del_var(window, name) ⇒ void
See :h nvim_win_del_var().
-
#get_buf(window) ⇒ Buffer
See :h nvim_win_get_buf().
-
#get_cursor(window) ⇒ Array<Integer>
See :h nvim_win_get_cursor().
-
#get_height(window) ⇒ Integer
See :h nvim_win_get_height().
-
#get_number(window) ⇒ Integer
See :h nvim_win_get_number().
-
#get_option(window, name) ⇒ Object
See :h nvim_win_get_option().
-
#get_position(window) ⇒ Array<Integer>
See :h nvim_win_get_position().
-
#get_tabpage(window) ⇒ Tabpage
See :h nvim_win_get_tabpage().
-
#get_var(window, name) ⇒ Object
See :h nvim_win_get_var().
-
#get_width(window) ⇒ Integer
See :h nvim_win_get_width().
-
#height ⇒ Integer
Get the height of the window.
-
#height=(height) ⇒ Integer
Set the height of the window.
-
#is_valid(window) ⇒ Boolean
See :h nvim_win_is_valid().
-
#set_cursor(window, pos) ⇒ void
See :h nvim_win_set_cursor().
-
#set_height(window, height) ⇒ void
See :h nvim_win_set_height().
-
#set_option(window, name, value) ⇒ void
See :h nvim_win_set_option().
-
#set_var(window, name, value) ⇒ void
See :h nvim_win_set_var().
-
#set_width(window, width) ⇒ void
See :h nvim_win_set_width().
-
#width ⇒ Integer
Get the width of the window.
-
#width=(width) ⇒ Integer
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
.[](index) ⇒ Object
13 14 15 |
# File 'lib/neovim/ruby_provider/window_ext.rb', line 13 def self.[](index) ::Vim.get_current_tabpage.list_wins[index] end |
.count ⇒ Object
9 10 11 |
# File 'lib/neovim/ruby_provider/window_ext.rb', line 9 def self.count ::Vim.get_current_tabpage.list_wins.size end |
.current ⇒ Object
5 6 7 |
# File 'lib/neovim/ruby_provider/window_ext.rb', line 5 def self.current ::Vim.get_current_win end |
Instance Method Details
#buffer ⇒ Buffer
Get the buffer displayed in the window
11 12 13 |
# File 'lib/neovim/window.rb', line 11 def buffer get_buf end |
#cursor ⇒ Array(Integer, Integer)
Get the cursor coordinates
50 51 52 |
# File 'lib/neovim/window.rb', line 50 def cursor get_cursor end |
#cursor=(coords) ⇒ Array(Integer, Integer)
Set the cursor coodinates
58 59 60 61 62 63 |
# File 'lib/neovim/window.rb', line 58 def cursor=(coords) _x, _y = coords x = [_x, 1].max y = [_y, 0].max + 1 @session.request(:nvim_eval, "cursor(#{x}, #{y})") end |
#del_var(window, name) ⇒ void
This method returns an undefined value.
See :h nvim_win_del_var()
|
|
# File 'lib/neovim/window.rb', line 67
|
#get_cursor(window) ⇒ Array<Integer>
See :h nvim_win_get_cursor()
|
|
# File 'lib/neovim/window.rb', line 67
|
#get_height(window) ⇒ Integer
See :h nvim_win_get_height()
|
|
# File 'lib/neovim/window.rb', line 67
|
#get_number(window) ⇒ Integer
See :h nvim_win_get_number()
|
|
# File 'lib/neovim/window.rb', line 67
|
#get_option(window, name) ⇒ Object
See :h nvim_win_get_option()
|
|
# File 'lib/neovim/window.rb', line 67
|
#get_position(window) ⇒ Array<Integer>
See :h nvim_win_get_position()
|
|
# File 'lib/neovim/window.rb', line 67
|
#get_var(window, name) ⇒ Object
See :h nvim_win_get_var()
|
|
# File 'lib/neovim/window.rb', line 67
|
#get_width(window) ⇒ Integer
See :h nvim_win_get_width()
|
|
# File 'lib/neovim/window.rb', line 67
|
#height ⇒ Integer
Get the height of the window
18 19 20 |
# File 'lib/neovim/window.rb', line 18 def height get_height end |
#height=(height) ⇒ Integer
Set the height of the window
26 27 28 29 |
# File 'lib/neovim/window.rb', line 26 def height=(height) set_height(height) height end |
#is_valid(window) ⇒ Boolean
See :h nvim_win_is_valid()
|
|
# File 'lib/neovim/window.rb', line 67
|
#set_cursor(window, pos) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_cursor()
|
|
# File 'lib/neovim/window.rb', line 67
|
#set_height(window, height) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_height()
|
|
# File 'lib/neovim/window.rb', line 67
|
#set_option(window, name, value) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_option()
|
|
# File 'lib/neovim/window.rb', line 67
|
#set_var(window, name, value) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_var()
|
|
# File 'lib/neovim/window.rb', line 67
|
#set_width(window, width) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_width()
|
|
# File 'lib/neovim/window.rb', line 67
|
#width ⇒ Integer
Get the width of the window
34 35 36 |
# File 'lib/neovim/window.rb', line 34 def width get_width end |
#width=(width) ⇒ Integer
Set the width of the window
42 43 44 45 |
# File 'lib/neovim/window.rb', line 42 def width=(width) set_width(width) width end |