-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show description in search #47
Comments
The last ("Comments Lined Up") variant doesn't work in |
yup, @0, that's correct. |
I couldn't find anything when the issue originally came up, but I think I've fixed it now. |
@0, that's awesome! |
Ok, looks like after @0's fix we can go with Comments Lined Up style, Nice! |
Related to #13. |
related to #173 ? |
#403 will allow for comments on the same line. |
This is actually something we could do very easy, at least Vundle doesn't need major change. Since we allow comments on the line, we can extract the short summary (usually rest of Title tag) and pack it in with the json file the scrapper outputs. We just need to make a slight modification, use single quotes on strings and add comment after ". Old json : ["test.vim","pytest.vim",...] New JSON: ['test.vim " A short description', 'pytest.vim " Another desc',...] Patch for Vundle to accept format: diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim
index 5c43547..6d99231 100644
--- a/autoload/vundle/scripts.vim
+++ b/autoload/vundle/scripts.vim
@@ -111,10 +111,10 @@ func! vundle#scripts#view(title, headers, results)
com! -buffer -bang -nargs=1 DeletePlugin
\ call vundle#installer#run('vundle#installer#delete', split(<q-args>,',')[0], ['!' == '<bang>', <args>])
- com! -buffer -bang -nargs=? InstallAndRequirePlugin
+ com! -buffer -bar -bang -nargs=? InstallAndRequirePlugin
\ call vundle#installer#run('vundle#installer#install_and_require', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>])
- com! -buffer -bang -nargs=? InstallPlugin
+ com! -buffer -bar -bang -nargs=? InstallPlugin
\ call vundle#installer#run('vundle#installer#install', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>])
com! -buffer -bang -nargs=0 InstallHelptags @gmarik Any thoughts on this? I'm still not familiar with the scraper, I'll go have a look. |
Adding @jdevera. While we are on the subject, we may want to just skip modifying the scraper and add support for parsing using this file > http://www.vim.org/script-info.php. Comes complete with summary of each plugin, releases and ids of files to download/extract. Files way too huge though we'd have to trim it down substantially. That would be part of a much larger refactor, could mean we could stop using the scraper which both costs money and takes time, more importantly has lots of overhead. We could easily refresh this file quickly and trim lines we don't need from the json. To make it readable with vim do: wget http://www.vim.org/script-info.php | cat script-info.php | python -mjson.tool > scripts.json Edit: Thought about it some and probably easiest to do the first. Though, we could use this php file and cross reference it with the script json generator to add in the summary. |
About the new JSON above, I'd rather those two things were in different strings, so we don't have to do more processing in vim. [["name", "description"],["name2","description2"]] Still ugly JSON, but with the work already done. |
That script-info.php is a gem! If the scrapper is not based on this, it probably should! BTW, anyone knows anything about the status of the scrapper? @gmarik? |
If you start using "script-info" you can join vim-pi, too (just my two cents) - we'd appreciate that. Yes - we are also willing to accept changes to vim-pi if that's necessary. |
Why is vim-pi in bitbucket? while everything else is happening on github? I wonder. |
https://bitbucket.org/vimcommunity/vim-pi/issue/94/document-officially-why-bitbucket-and-not |
@jdevera scraper is running daily but it not updating API data which Vundle is using. |
vim-pi does the following: It parses the install instructions for git urls. That's why VAM knows about many (not all) github repositories. The true fix is to update vim.sf.net - but then it would be helpful to integrate with github etc - which cannot be done easily because you cannot use github API from sourceforge's PHP hosting. You could workaround it by creating third party services calling into vim.sf.net .. You may do whatever you think is best. |
@gmarik Is there a reason the scraper doesn't update the API data that Vundle downloads? |
Just wanted to mention that I hope to see this feature soon. Is there currently any way to even distinguish between two identically-named vim.org scripts after doing a "search"? (For instance, ":BundleSearch Rename" gives a list that includes both http://www.vim.org/scripts/script.php?script_id=3525 and http://www.vim.org/scripts/script.php?script_id=1928 with nothing to distinguish them, and they have completely different behavior.) Edit: It appears that installing |
@BatmanAoD I believe that is an issue more related to the scraper that indexes vim.org. Vundle just parses a json file to get that list, you can see it in your bundle dir under .vundle. I don't really know the internals of the scraper so more an issue for gmarik. |
Hm. Looks like this is just #183, which is due to vim-scraper/vim-scraper#65, which hasn't had an update in a year. Looks like the scraper has the ability to resolve name collisions, but gmarik says that it's failing to recognize them due to local repos being out-of-date. |
For :Bundles and :BundleSearch, show the short description for listed bundles. That is, the second column in the table on vim-scripts.org. I often find I need to go to that site just to see what a bundle really does.
As I see it there are three possible formats for this.
Comment First
This is most similar to common formatting of source code. A down side is the need for extra whitespace.
Comment After
Feels more like a description as one might design it on a website; puts focus on the Bundle line. Also whitespace-heavy.
Comments Lined Up
This makes yanking include the description, for better or worse. Easier to scan. Doesn't require more whitespace than without descriptions. Unlikely to work well with long bundle names.
The text was updated successfully, but these errors were encountered: