Module: ReadSource::VimSource

Defined in:
lib/read_source.rb

Instance Method Summary collapse

Instance Method Details

#vimObject



5
6
7
8
9
# File 'lib/read_source.rb', line 5

def vim
  file, line_num = send :source_location
  read_only = !!/#{ENV["GEM_HOME"]}/.match(file) ? "-M" : ""
  exec("vim %s +%s %s" % [read_only, line_num, file]) if file
end