Skip to content

Commit

Permalink
Smarter loading of the fuzzy_file_finder module
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Oct 12, 2008
1 parent 0f5c8cb commit c524007
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions fuzzyfinder_textmate.vim
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,21 @@ command! -bang -narg=? -complete=file FuzzyFinderTextMate call FuzzyFinderTe

function! InstantiateTextMateMode() "{{{
ruby << RUBY
$LOAD_PATH << "#{ENV['HOME']}/.vim/ruby"

begin
require 'rubygems'
gem 'fuzzy_file_finder'
require "#{ENV['HOME']}/.vim/ruby/fuzzy_file_finder"
rescue LoadError
end
begin
require 'rubygems'
begin
gem 'fuzzy_file_finder'
rescue Gem::LoadError
gem 'jamis-fuzzy_file_finder'
end
rescue LoadError
end

require 'fuzzy_file_finder'
require 'fuzzy_file_finder'
end
RUBY

ruby def finder; @finder ||= FuzzyFileFinder.new; end
Expand Down

0 comments on commit c524007

Please sign in to comment.