Class: Neovim::Window Private
- Inherits:
-
RemoteObject
- Object
- RemoteObject
- Neovim::Window
- Defined in:
- lib/neovim/window.rb,
lib/neovim/ruby_provider/window_ext.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from RemoteObject
Class Method Summary collapse
- .[](index) ⇒ Object private
- .count ⇒ Object private
- .current ⇒ Object private
Instance Method Summary collapse
-
#buffer ⇒ Buffer
Get the buffer displayed in the window.
-
#call(fun) ⇒ Object
See :h nvim_win_call().
-
#close(force) ⇒ void
See :h nvim_win_close().
-
#cursor ⇒ Array(Integer, Integer)
Get the cursor coordinates.
-
#cursor=(coords) ⇒ Array(Integer, Integer)
Set the cursor coodinates.
-
#del_var(name) ⇒ void
See :h nvim_win_del_var().
-
#get_buf ⇒ Buffer
See :h nvim_win_get_buf().
-
#get_config ⇒ Hash
See :h nvim_win_get_config().
-
#get_cursor ⇒ Array<Integer>
See :h nvim_win_get_cursor().
-
#get_height ⇒ Integer
See :h nvim_win_get_height().
-
#get_number ⇒ Integer
See :h nvim_win_get_number().
-
#get_option(name) ⇒ Object
See :h nvim_win_get_option().
-
#get_position ⇒ Array<Integer>
See :h nvim_win_get_position().
-
#get_tabpage ⇒ Tabpage
See :h nvim_win_get_tabpage().
-
#get_var(name) ⇒ Object
See :h nvim_win_get_var().
-
#get_width ⇒ Integer
See :h nvim_win_get_width().
-
#height ⇒ Integer
Get the height of the window.
-
#height=(height) ⇒ Integer
Set the height of the window.
-
#hide ⇒ void
See :h nvim_win_hide().
-
#is_valid ⇒ Boolean
See :h nvim_win_is_valid().
-
#set_buf(buffer) ⇒ void
See :h nvim_win_set_buf().
-
#set_config(config) ⇒ void
See :h nvim_win_set_config().
-
#set_cursor(pos) ⇒ void
See :h nvim_win_set_cursor().
-
#set_height(height) ⇒ void
See :h nvim_win_set_height().
-
#set_hl_ns(ns_id) ⇒ void
See :h nvim_win_set_hl_ns().
-
#set_option(name, value) ⇒ void
See :h nvim_win_set_option().
-
#set_var(name, value) ⇒ void
See :h nvim_win_set_var().
-
#set_width(width) ⇒ void
See :h nvim_win_set_width().
-
#text_height(opts) ⇒ Hash
See :h nvim_win_text_height().
-
#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_missing?, #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
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/neovim/ruby_provider/window_ext.rb', line 14 def self.[](index) ::Vim.get_current_tabpage.list_wins[index] 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 |
#close(force) ⇒ void
This method returns an undefined value.
See :h nvim_win_close()
|
# File 'lib/neovim/window.rb', line 67
|
#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(name) ⇒ void
This method returns an undefined value.
See :h nvim_win_del_var()
|
# File 'lib/neovim/window.rb', line 67
|
#get_config ⇒ Hash
See :h nvim_win_get_config()
|
# File 'lib/neovim/window.rb', line 67
|
#get_cursor ⇒ Array<Integer>
See :h nvim_win_get_cursor()
|
# File 'lib/neovim/window.rb', line 67
|
#get_height ⇒ Integer
See :h nvim_win_get_height()
|
# File 'lib/neovim/window.rb', line 67
|
#get_number ⇒ Integer
See :h nvim_win_get_number()
|
# File 'lib/neovim/window.rb', line 67
|
#get_position ⇒ Array<Integer>
See :h nvim_win_get_position()
|
# File 'lib/neovim/window.rb', line 67
|
#get_width ⇒ 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 |
#hide ⇒ void
This method returns an undefined value.
See :h nvim_win_hide()
|
# File 'lib/neovim/window.rb', line 67
|
#is_valid ⇒ Boolean
See :h nvim_win_is_valid()
|
# File 'lib/neovim/window.rb', line 67
|
#set_buf(buffer) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_buf()
|
# File 'lib/neovim/window.rb', line 67
|
#set_config(config) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_config()
|
# File 'lib/neovim/window.rb', line 67
|
#set_cursor(pos) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_cursor()
|
# File 'lib/neovim/window.rb', line 67
|
#set_height(height) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_height()
|
# File 'lib/neovim/window.rb', line 67
|
#set_hl_ns(ns_id) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_hl_ns()
|
# File 'lib/neovim/window.rb', line 67
|
#set_option(name, value) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_option()
|
# File 'lib/neovim/window.rb', line 67
|
#set_var(name, value) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_var()
|
# File 'lib/neovim/window.rb', line 67
|
#set_width(width) ⇒ void
This method returns an undefined value.
See :h nvim_win_set_width()
|
# File 'lib/neovim/window.rb', line 67
|
#text_height(opts) ⇒ Hash
See :h nvim_win_text_height()
|
# 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 |