Sha256: 65882d423b526d97ddf9e0eb9ea3a116018119df144106c132cb27c2de6d5d11

Contents?: true

Size: 243 Bytes

Versions: 3

Compression:

Stored size: 243 Bytes

Contents

module ReadSource
  module VimSource
    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
read_source-0.2.2 lib/read_source/vim_source.rb
read_source-0.2.1 lib/read_source/vim_source.rb
read_source-0.2.0 lib/read_source/vim_source.rb