diff --git a/Rakefile b/Rakefile index 15cece2..70350a0 100644 --- a/Rakefile +++ b/Rakefile @@ -4,8 +4,13 @@ namespace :snippets_dir do task :find do vim_dir = File.join(ENV['VIMFILES'] || ENV['HOME'] || ENV['USERPROFILE'], RUBY_PLATFORM =~ /mswin|msys|mingw32/ ? "vimfiles" : ".vim") - pathogen_dir = File.join(vim_dir, "bundle") - @snippets_dir = File.directory?(pathogen_dir) ? File.join(pathogen_dir, "snipmate", "snippets") : File.join(vim_dir, "snippets") + possible_dirs = [ + File.join(vim_dir, 'snippets'), + File.join(vim_dir, 'bundle', 'snipmate', 'snippets'), + File.join(vim_dir, 'bundle', 'snipmate.vim', 'snippets') + ] + + @snippets_dir = possible_dirs.find{ |dir| File.directory? dir } end desc "Purge the contents of the vim snippets directory"