Module: Vimrunner::Platform

Extended by:
Platform
Included in:
Platform
Defined in:
lib/vimrunner/platform.rb

Overview

Public: The Platform module contains logic for finding a Vim executable that supports the clientserver functionality on the current system. Its methods can be used to fetch a Vim path for initializing a Server.

Examples

Vimrunner::Platform.vim
# => "gvim"

Instance Method Summary collapse

Instance Method Details

#gvimObject

Public: Looks for a GUI Vim executable that’s suitable for the current platform.

Returns the String Vim executable. Raises NoSuitableVimError if no suitable Vim can be found.



33
34
35
# File 'lib/vimrunner/platform.rb', line 33

def gvim
  gvims.find { |gvim| suitable?(gvim) } or raise NoSuitableVimError
end

#vimObject

Public: Looks for a Vim executable that’s suitable for the current platform. Also attempts to find an appropriate GUI vim if terminal ones are unsuitable.

Returns the String Vim executable. Raises NoSuitableVimError if no suitable Vim can be found.



24
25
26
# File 'lib/vimrunner/platform.rb', line 24

def vim
  vims.find { |vim| suitable?(vim) } or raise NoSuitableVimError
end