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( = {}) @executable = .fetch(:executable) { Platform.vim } @name = .fetch(:name) { "VIMRUNNER#{rand}" }.upcase @vimrc = .fetch(:vimrc) { VIMRC } @gvimrc = .fetch(:gvimrc) { "NONE" } @foreground = .fetch(:foreground, true) end |