Now supporting vagrant 1.2. Simplified config class. SSH not working
[vagrant-dotfiles.git] / lib / copy_my_conf / vim.rb
index f8935ed..b7c55bd 100644 (file)
@@ -1,21 +1,17 @@
-module Vagrant
-  module Provisioners
-    class CopyMyConf < Base
-      class Vim
-        def prepare vm, tmp_root
-          `mkdir -p #{tmp_root}/vim`
-          ["~/.vimrc", "~/.vim"].each do |file|
-            `cp -r #{file} #{tmp_root}/vim`
-          end
-          vm.share_folder("vim", "#{tmp_root}/vim", "#{tmp_root}/vim")
-        end
-
-        def provision channel, user_home, tmp_root
-          puts "Copying your vim configuratios"
-          channel.execute("rm -rf #{user_home}/.vim*")
-          channel.execute("cp -r #{tmp_root}/vim/.??* ~/")
-        end
+module CopyMyConf
+  class Vim
+    def prepare vm, tmp_root
+      `mkdir -p #{tmp_root}/vim`
+      ["~/.vimrc", "~/.vim"].each do |file|
+        `cp -r #{file} #{tmp_root}/vim`
       end
+      vm.synced_folder("#{tmp_root}/vim", "#{tmp_root}/vim", :id => "vim")
+    end
+
+    def provision channel, user_home, tmp_root
+      puts "Copying your vim configuratios"
+      channel.execute("rm -rf #{user_home}/.vim*")
+      channel.execute("cp -r #{tmp_root}/vim/.??* ~/")
     end
   end
 end