Now supporting vagrant 1.2. Simplified config class. SSH not working
[vagrant-dotfiles.git] / lib / copy_my_conf / vim.rb
1 module CopyMyConf
2 class Vim
3 def prepare vm, tmp_root
4 `mkdir -p #{tmp_root}/vim`
5 ["~/.vimrc", "~/.vim"].each do |file|
6 `cp -r #{file} #{tmp_root}/vim`
7 end
8 vm.synced_folder("#{tmp_root}/vim", "#{tmp_root}/vim", :id => "vim")
9 end
10
11 def provision channel, user_home, tmp_root
12 puts "Copying your vim configuratios"
13 channel.execute("rm -rf #{user_home}/.vim*")
14 channel.execute("cp -r #{tmp_root}/vim/.??* ~/")
15 end
16 end
17 end