Fix a bug with installing new vim plugin from the command line
Fixes #328
This commit is contained in:
parent
73240f018a
commit
26a36a7451
@ -7,7 +7,8 @@ module Vundle
|
|||||||
|
|
||||||
vundles = vundles_from_file
|
vundles = vundles_from_file
|
||||||
last_bundle_dir = vundles.rindex{ |line| line =~ /^Bundle / }
|
last_bundle_dir = vundles.rindex{ |line| line =~ /^Bundle / }
|
||||||
vundles.insert last_bundle_dir+1, "Bundle \"#{plugin_repo}\""
|
last_bundle_dir = last_bundle_dir ? last_bundle_dir+1 : 0
|
||||||
|
vundles.insert last_bundle_dir, "Bundle \"#{plugin_repo}\""
|
||||||
write_vundles_to_file vundles
|
write_vundles_to_file vundles
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -25,16 +26,18 @@ module Vundle
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.update_vundle
|
def self.update_vundle
|
||||||
system "vim --noplugin -u vim/vundles.vim -N \"+set hidden\" \"+syntax on\" +BundleClean +BundleInstall +qall"
|
system "vim --noplugin -u #{ENV['HOME']}/.vim/vundles.vim -N \"+set hidden\" \"+syntax on\" +BundleClean +BundleInstall +qall"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
def self.contains_vundle?(vundle_name)
|
def self.contains_vundle?(vundle_name)
|
||||||
|
FileUtils.touch(@vundles_path) unless File.exists? @vundles_path
|
||||||
File.read(@vundles_path).include?(vundle_name)
|
File.read(@vundles_path).include?(vundle_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.vundles_from_file
|
def self.vundles_from_file
|
||||||
|
FileUtils.touch(@vundles_path) unless File.exists? @vundles_path
|
||||||
File.read(@vundles_path).split("\n")
|
File.read(@vundles_path).split("\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
1
vim/after/plugin/dune-ctags.vim
Normal file
1
vim/after/plugin/dune-ctags.vim
Normal file
@ -0,0 +1 @@
|
|||||||
|
set tags+=tags,gems.tags,stdlib.tags
|
Loading…
Reference in New Issue
Block a user