Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really wish it had Cmd+P support for searching for project files.

I find the project a really cool concept, but am genuinely curious what real value this is adding in it's current incarnation? Navigating the folder structure is kinda nice, but I don't see much else.

Am I missing something obvious?



> what real value this is adding in it's current incarnation?

Ctrl+Shift+F works. I've forgotten how many repos I clone off github just to be able to search all through the code.


> 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.


Github allows you to search through repositories as long as they're not forks.


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.


If anyone is looking for actually useful cross-repo search: https://grep.app/


This is great, thank you.


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".


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)


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, ..."


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.


And as long as you’re not trying to do a case-sensitive search.


> I really wish it had Cmd+P support for searching for project files.

Works for me. CTRL+P on Linux though.


> Am I missing something obvious?

Better search, find definition, ...


Search is completely broken for me... for example on https://github1s.com/matryer/bitbar, searching for just the letter "a" returns no results. Am I doing something wrong?


Search appears to only work once the files are cached, if you open a file then close it, search will find it.


Then you need to cache all files, which you were already doing years ago by cloning and browsing locally.

I too see no special value in the end.


Ah, makes sense! Thanks!


It appears to only work for files which have already been opened.


Nothing obvious. I've found Cmd+Shift+P, then delete the > character, works extremely well in place of Cmd+P.


Confirmed CMD+P just worked for me on mac.

Shift+CMD+P does not but without Shift it works




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: