Method: Vimrunner::Server#initialize

Defined in:
lib/vimrunner/server.rb

#initialize(options = {}) ⇒ Server

Public: Initialize a Server

options - The Hash options used to define a server (default: {}):

:executable - The String Vim executable to use (optional)
              (default: Platform.vim).
:name       - The String name of the Vim server (optional)
              (default: "VIMRUNNER#{rand}").
:vimrc      - The String vimrc file to source in the client (optional)
              (default: Server::VIMRC).
:foreground - Boolean, whether to start Vim with the -f option (optional)
              (default: true).


37
38
39
40
41
42
43
# File 'lib/vimrunner/server.rb', line 37

def initialize(options = {})
  @executable = options.fetch(:executable) { Platform.vim }
  @name       = options.fetch(:name) { "VIMRUNNER#{rand}" }.upcase
  @vimrc      = options.fetch(:vimrc) { VIMRC }
  @gvimrc     = options.fetch(:gvimrc) { "NONE" }
  @foreground = options.fetch(:foreground, true)
end