lostintangent / gistpad

VS Code extension for managing and sharing code snippets, notes and interactive samples using GitHub Gists
https://aka.ms/gistpad
MIT License
929 stars 59 forks source link

Search/Filter Gists #48

Open macjustice opened 4 years ago

macjustice commented 4 years ago

It would be super helpful to be able to search gists by filename, description, and contents.

lostintangent commented 4 years ago

Great suggestion! Let me look into what options we have for enabling this experience 👍

RandomFractals commented 4 years ago

well, github gists api does support search interface by keywords and language.

So, for example, I would like to search for all keplergl json gists like so:

https://gist.github.com/search?l=JSON&q=keplergl

and have gist pad display it in a gists tree view for me to review them and star if I like them.

RobertKlohr commented 4 years ago

I don't know if this aligns with the intent of the original request, if not please move to a new enhancement request.

I would really benefit from being able to filter my Gists. I program in multiple languages and being able to only have my Gists that match the project I am working on would be really helpful. If I could only of the features from this set today it would be the ability to somehow tag and hide specific Gists that I own. I use my Gists for more than programming and snippets (like configuration backup) and removing those non-programming Gists from the VSCode UI would be great.

One way that I came up with that would have the considerable flexibility and scalability would be to have the option of adding a GistPad JSON formatted settings file to each Gist. This file would contain a set of defined flags/labels that the GistPad extension could read when it pulls the Gist to take specific actions like hiding, grouping, displaying based on the loaded workspace in VSCode.

The other way of course would be to save the settings within the extension settings on the host.

Long term would be the ability to set and remove the flags/labels in the UI.

Some settings examples: [boolean]Hidden [array]Language [array]workspace/project

Thanks for a great extension!

RandomFractals commented 4 years ago

I second @RjKGitHub idea. I think it would be great to be able to create gist 'collections'.

For example, I like how ObservableHQ allows you to tag JS notebooks and create lists/group them via collections: https://observablehq.com/@randomfractals?tab=collections

lostintangent commented 4 years ago

@RjKGitHub This is an awesome suggestion! Let me give this some thought. Just as an FYI, I just shipped support for grouping gists by "type". This wouldn't satisfy your need to filter per-language/workspace/etc., but it might help a little bit (?). That said, I need to add a group for configuration. Would you be able to share some example gists that I could use for reference?

RandomFractals commented 4 years ago

@lostintangent see https://github.com/RandomFractals/geo-data-viewer#features

& https://gist.github.com/search?l=JSON&q=keplergl

for keplerGL gists & maps collections. I posted more info on twitter ;)

Eventually, I'd like to be able to create keplerGL, vega, data gist collections when you get around to adding that feature.

Keep in mind some of those gists might be intersecting. Why I think adding tags for gists via GistPad and creating collections that way would be best way to go about implementing that feature ...

Grouping by type is a good start :)

IAmStoxe commented 4 years ago

+1

If it helps at all they have a search feature in https://github.com/k9982874/github-gist-explorer - Perhaps it will provide some insight in to how it may be implemented here?

lostintangent commented 4 years ago

@IAmStoxe Ae you looking to search across Gist names, files names, or file contents? I think the extension you pointed out just includes searching for gists and file names, not file contents?

IAmStoxe commented 4 years ago

Perhaps I did not test it thoroughly enough before recommending; I apologize about that.

Is there no way to index the contents and tie them to a gist id via a JSON file or something and scan the file during search, returning the gist? Or is it just a matter of implementing it?

majkinetor commented 4 years ago

This should work in general, not only for gists, but for group, scratch notes etc.

rw3iss commented 3 years ago

Adding to the idea that people that LOVE using gists... NEED a way to search them ;) Thanks for this great extension!

scsskid commented 2 years ago

yes please, searching titles would be enough for most I guess

lostintangent commented 2 years ago

I'm going to look into this over the next couple of days. That said, as a potential workaround: if you run the GistPad: Open Gist command (or right-click the Your Gists node and select Open Gist), that will display a list of your gists, categorized by title. At that point, you can filter by title simply by typing what you want to find. When you select a gist, it will then open it. Depending on your workflow, this might be helpful enough for some?

rw3iss commented 2 years ago

The Open Gists search is fairly sufficient, thanks for the tip! Would still really like a way to search the gist code... I don't even think github has a feature to do this...

On Wed, Sep 1, 2021 at 4:56 PM Benedikt Gregor @.***> wrote:

ah like in file explorer I guess? I think also via command promp is enough, maybe one button which opens prompt if it doesnt clutter ui too much

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lostintangent/gistpad/issues/48#issuecomment-910742693, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC23GFS5P73SHJNNVFEPBDT72HO5ANCNFSM4J6DL2SA .

majkinetor commented 2 years ago

I'm going to look into this over the next couple of days. That said, as a potential workaround: if you run the GistPad: Open Gist command (or right-click the Your Gists node and select Open Gist), that will display a list of your gists, categorized by title. At that point, you can filter by title simply by typing what you want to find. When you select a gist, it will then open it. Depending on your workflow, this might be helpful enough for some?

Yeah, I am using this constantly.

WebSpectrum commented 2 years ago

+1 ... I have a lot opf GISTS amd wuold really need a search

wteuber commented 6 months ago

+1 searching gist filenames, descriptions in GistPad would already be a great improvement (contents would be nice, but I can see how it complicates things)

quantumleap33 commented 5 months ago

Any plans on this yet?