Skip to content

Commit 68c133b

Browse files
jarmoscrooloose
authored andcommitted
detect correctly Windows OS
work with pathogen.vim too
1 parent 50574d8 commit 68c133b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Rakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
namespace :snippets_dir do
55
task :find do
6-
@snippets_dir = File.join(ENV['VIMFILES'] || ENV['HOME'] || ENV['USERPROFILE'], RUBY_PLATFORM =~ /mswin32/ ? "vimfiles" : ".vim", "snippets")
6+
vim_dir = File.join(ENV['VIMFILES'] || ENV['HOME'] || ENV['USERPROFILE'], RUBY_PLATFORM =~ /mswin|msys|mingw32/ ? "vimfiles" : ".vim")
7+
pathogen_dir = File.join(vim_dir, "bundle")
8+
@snippets_dir = File.directory?(pathogen_dir) ? File.join(pathogen_dir, "snipmate", "snippets") : File.join(vim_dir, "snippets")
79
end
810

911
desc "Purge the contents of the vim snippets directory"

0 commit comments

Comments
 (0)