lib/utils/config/config_file.rb in utils-0.0.73 vs lib/utils/config/config_file.rb in utils-0.0.74
- old
+ new
@@ -227,9 +227,22 @@
@ssh_tunnel = SshTunnel.new(&block)
end
@ssh_tunnel ||= SshTunnel.new
end
+ class Edit < BlockConfig
+ config :vim_path do `which vim`.chomp end
+
+ config :vim_default_args, nil
+ end
+
+ def edit(&block)
+ if block
+ @edit = Edit.new(&block)
+ end
+ @edit ||= Edit.new
+ end
+
def to_ruby
result = "# vim: set ft=ruby:\n"
for bc in %w[search discover strip_spaces probe ssh_tunnel]
result << "\n" << __send__(bc).to_ruby
end