Re:Github1s – One second to read GitHub code with VS Code
by rkangel on Wednesday February 10, 2021 @06:23AM
(#26087861)
> Ctrl+Shift+F works
It's not working for me (it's also the first thing I wanted). It only seems to search through files that are already open in an editor tab. E.g. in the vscode repo linked from the README search for "nodeModulesPath" and no results, but open bootstrap-node.js and it's there on line 22.
Re:Github1s – One second to read GitHub code with VS Code
by xmprt on Wednesday February 10, 2021 @01:25AM
(#26086200)
Github allows you to search through repositories as long as they're not forks.
Re:Github1s – One second to read GitHub code with VS Code
by KerrickStaley on Wednesday February 10, 2021 @01:55AM
(#26086316)
GitHub search is notoriously poor, though—it can only match whole words (e.g. the query "FooBar" does not match the text "FooBarBaz"), and it doesn't support regexes.
Re:Github1s – One second to read GitHub code with VS Code
by loganlinn on Wednesday February 10, 2021 @04:58AM
(#26087339)
If anyone is looking for actually useful cross-repo search: https://grep.app/
Re:Github1s – One second to read GitHub code with VS Code
by Ayesh on Wednesday February 10, 2021 @08:44AM
(#26088884)
This is great, thank you.
Re:Github1s – One second to read GitHub code with VS Code
by dathinab on Wednesday February 10, 2021 @04:56AM
(#26087327)
And way worse it doesn't even keep word order and similar.
So searching for `fn foobar` will return any file containing the words `fn` and `foobar` not caring about you looking for `fn foobar`.
Then if you find what you want opening the preview doesn't jump to the right line in the file so I have to search again using "find in page".
Re:Github1s – One second to read GitHub code with VS Code
by nightpool on Wednesday February 10, 2021 @03:02AM
(#26086645)
In addition to the flaws mentioned by the other commenters (whole word only, no regexes), Github will only search the master branch of a repo, which makes it useless for my two most common tasks "where did this code used to be used" and "does this unmerged PR manage to remove all of the references to this code in its refactor (incl. in comments/etc)"
EDIT: Unfortunately, it seems like search doesn't work at all on this site, which is a shame. (at least, when I tried to do it on https://github1s.com/rails/rails it failed)
Re:Github1s – One second to read GitHub code with VS Code
by soenkeliebau on Wednesday February 10, 2021 @06:12AM
(#26087772)
It does have search, but I'd be willing to wager that the normal workflow when using that is "try searching for something, look at the results page, swear, clone, ..."
Re:Github1s – One second to read GitHub code with VS Code
by perryizgr8 on Wednesday February 10, 2021 @01:29AM
(#26086213)
How does that work? I've never been able to find this option. Also, this tool's search is broken. It searches only the currently open file.
Ctrl+Shift+F works. I've forgotten how many repos I clone off github just to be able to search all through the code.