Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down