Module: Vim
- Defined in:
- lib/neovim/ruby_provider/vim.rb
Overview
The VIM module provides backwards compatibility for the :ruby, :rubyfile, and :rubydo vim functions.
Constant Summary collapse
- Buffer =
::Neovim::Buffer
- Window =
::Neovim::Window
Class Method Summary collapse
- .__client=(client) ⇒ Object
- .__refresh_globals(client) ⇒ Object
-
.method_missing(method, *args, &block) ⇒ Object
Delegate all method calls to the underlying
Neovim::Clientobject.
Class Method Details
.__client=(client) ⇒ Object
12 13 14 |
# File 'lib/neovim/ruby_provider/vim.rb', line 12 def self.__client=(client) @__client = client end |
.__refresh_globals(client) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/neovim/ruby_provider/vim.rb', line 23 def self.__refresh_globals(client) bufnr = client.evaluate("bufnr('%')") $curbuf = @__buffer_cache.fetch(bufnr) do @__buffer_cache[bufnr] = client.get_current_buf end $curwin = client.get_current_win end |
.method_missing(method, *args, &block) ⇒ Object
Delegate all method calls to the underlying Neovim::Client object.
17 18 19 20 21 |
# File 'lib/neovim/ruby_provider/vim.rb', line 17 def self.method_missing(method, *args, &block) @__client.public_send(method, *args, &block).tap do __refresh_globals(@__client) end end |