Open rpattabi opened 12 years ago
If you already know 'mattn/gist-vim', what is the need to search it for?
I could see how this could could be an issue. As the maintainer of several vim scripts I'll admit I haven't updated any of them on vim.org in a very long time. Mostly due to the fact I don't remember my password and never ask Bram to reset it :/
My only concern with this is you'll probably end up getting three results every time you search. In your example you'll end up with, at minimum, three versions
1) the repository on vim.org 2) mattn / gist-vim (the one you wanted) 3) vim-scripts/Gist.vim (vim.org mirror)
I'll leave out the fact you're going to end up hitting all the clones on github as well
https://github.com/search?q=%22gist-vim%22&repo=&p=1&type=Repositories&l=
In conclusion, I don't think this should happen.
@steveno In fact, Vundle never fetch scripts directly from virm.org, it use the mirror from vim-scripts.org instead. So, technically speaking, it is two versions, either the one from vim-scripts.org or the one from the maintainer's repo, as you can probably think about, there is no easyway to know and search to indentify the maintainer's repo, the only solution is vim-scripts.org.
function! s:search(name)
return map(filter(webapi#json#decode(webapi#http#get(printf('https://api.github.com/legacy/repos/search/%s', a:name)).content).repositories, 'v:val.name==a:name'), 'v:val.username ."/". v:val.name')
endfunction
echo s:search('gist-vim')
Probably, first item is you want. (require webapi-vim)
@mattn nice once!
@mattn Nice. This might return multiple results with all folks, how do we know which one is the root repo?
I have a prototype GithubSearch plugin which searches for all kinds of repos(not only vim ones), but it needs to be updated after recent Github API changes i think.
Oh, no, it actually works fine. Needs to be adapted for Vundle
root repo should be fork: false
function! s:search(name)
return map(filter(webapi#json#decode(webapi#http#get(printf('https://api.github.com/legacy/repos/search/%s', a:name)).content).repositories, 'v:val.name==a:name && !v:val.fork'), 'v:val.username ."/". v:val.name')
endfunction
echo s:search('gist-vim')
This return just one result.
Please collaborate with bitbucket.org/vimcommunity/vim-pi. Your solution might be vim-addon-manager or NeoBundle which both support vim-pi. vim-pi is meant to be a plugin pool with many sources, one is vim.sf.net, one are manually maintained github sources.
Looking for plugins should also be done by manually maintained indexes such as vim-wiki.mawercer.de which is meant to help people find solutions based on context such as "java editing".
It looks like github seems to have more up-to-date vimscripts than vim.org. See this issue I ran into recently.
It is great that
BundleInstall
allows to specify github bundles in.vimrc
. ButBundleSearch
searches only vim.org.I do understand unlike vim.org, github is not the only meant for vimscripts. But it could allow searches like the below:
:BundleSearch mattn/gist-vim
That is using the similar syntax as how github vimscript is specified in
.vimrc
file.Please let me know what you think.