Missing files, whoops
This commit is contained in:
parent
f22a06fd82
commit
dc21494747
@ -48,13 +48,12 @@ in order to install/search [all available vim scripts]
|
||||
|
||||
## Searching
|
||||
|
||||
:BundleSearch Finder
|
||||
:BundleSearch foo
|
||||
|
||||
Will split new window with results:
|
||||
|
||||
Bundle "FuzzyFinder"
|
||||
Bundle "Indent-Finder"
|
||||
Bundle "cHeaderFinder"
|
||||
Bundle "VimFootnotes"
|
||||
Bundle "foo.vim"
|
||||
|
||||
So you can just copy one you need to you <code>.vimrc</code>
|
||||
|
||||
|
39
autoload/vundle/scripts.vim
Normal file
39
autoload/vundle/scripts.vim
Normal file
@ -0,0 +1,39 @@
|
||||
func! vundle#scripts#search(...)
|
||||
let matches = map(vundle#scripts#lookup(a:1), ' printf("Bundle \"%-5s\"", v:val[1]) ') | let temp = tempname()
|
||||
call writefile(matches, temp)
|
||||
exec 'sp '.temp
|
||||
let @/=a:1
|
||||
endf
|
||||
|
||||
func! vundle#scripts#lookup(term)
|
||||
return filter(items(vundle#scripts#load()), 'v:val[1] =~ "'.escape(a:term,'"').'"')
|
||||
endf
|
||||
|
||||
func! vundle#scripts#fetch()
|
||||
let to = g:vundle_scripts_file
|
||||
let temp = tempname()
|
||||
silent exec '!curl http://vim-scripts.org/scripts.json > '.temp
|
||||
silent exec '!mkdir -p $(dirname '.to.') && mv -f '.temp.' '.to
|
||||
return to
|
||||
endf
|
||||
|
||||
func! vundle#scripts#read()
|
||||
if !filereadable(g:vundle_scripts_file)
|
||||
call vundle#scripts#fetch()
|
||||
endif
|
||||
return readfile(g:vundle_scripts_file, 'b')[0]
|
||||
endf
|
||||
|
||||
func! vundle#scripts#load()
|
||||
if !exists('g:vundle_scripts') || empty(g:vundle_scripts)
|
||||
let g:vundle_scripts_file = expand('$HOME/.vim-vundle/vim-scripts.org.json')
|
||||
let g:vundle_scripts = eval(vundle#scripts#read())
|
||||
endif
|
||||
|
||||
return g:vundle_scripts
|
||||
endf
|
||||
|
||||
func! vundle#scripts#find(id)
|
||||
let scripts = vundle#scripts#load()
|
||||
return scripts[a:id]
|
||||
endf
|
Loading…
Reference in New Issue
Block a user