
Introducing the File Finder - mattyb
https://github.com/blog/793-introducing-the-file-finder
======
patio11
This solves one of my largest annoyances when using Github as a Rails
developer, namely, "Oh yay, time to walk five levels up and four levels down
to find the place in the code of this gem where the function caused in the
line causing the problem is actually defined."

Previously if I had to do it more than once I would copy the gem to disk,
import to Netbeans, and then use Netbean's equivalent function. (Which I use
so frequently during development I should really map it to, I dunno, tab.)

~~~
holman
As a Rails developer I agree, although not as much as a Java developer agrees:

    
    
      com/ => company/ => moar_hierarchy/ => etc/ => even_more/ => files
    

Clicking though all of those empty directories, even with new slide from
earlier this year, was still a pain in the butt.

~~~
jbooth
You know, by the spec, you don't actually need levels called "etc" and
"moar_hierarchy". You can even skip com if you want.

------
jhrobert
So, a lot of small files create inconvenience and then one need a tool to
navigate the mess?

You don't need that if you put everything in OneBigFile. Mine is 24KLOC.
<http://simplijs.com/OneBigFileFormat>

Modern editors can handle big files.

BTW: I'm still looking for an editor that could open multiple files in a
single buffer/window.

~~~
raganwald
If you like OneBigFile, you'll really love OneBigFunction!

~~~
jhrobert
Well... If you look at the source code of a Smalltalk program, you'll tons of
small functions.

You'll probably enjoy that.

Problem is, grasping what they means turn to be difficult, it's like wherever
you look you just have to look elsewhere and feel like the real job is done...
no where. You basically struggle to get the "big picture".

Well... it's probably better than Forth.

There is more than one way to do it. I don't split a big function in two until
the other function is called from at least two places. What's the point of
having a function when all calls to it come from a single place?

But let the code speak, have a look at mine if you wish, this nice javascript
loader for example <http://simpliwiki.com/loadfire.js.html> \-- extracted
automatically from my one big file of course. :)

~~~
raganwald
Don't jump to conclusions about what I'd like or dislike... Adele Goldberg
said about Smalltalk: "Everything happens somewhere else." I don't think that
was meant as praise.

;-)

~~~
jhrobert
That's the quote I was looking for, you have a better memory that I :)

------
simonw
Awesome.

It's speedy too. I fired up Chrome Inspector and it looks like it works by
Ajaxing in a full list of files in your repo the first time you hit "t", then
doing the actual searching in the browser. Here's the URL it loaded for one of
my projects:

[https://github.com/simonw/bugle_project/tree-
list/1c7793bf60...](https://github.com/simonw/bugle_project/tree-
list/1c7793bf60a1652c3f35eb547b2d03e14188dc36)

------
moe
Perhaps I'm special but I've never wanted to search for a filename in a github
repository. Fulltext search on the other hand, that's a feature I have missed
often.

~~~
entropie
Yep, A searchbox for the actual repos would be a nice feature. Filenames and
content please ;)

~~~
holman
There's actually a search box in private repositories in the upper right-hand
corner that searches within the project. It was turned off for public
repositories for performance reasons, I think. Tom's sort of spearheading
revamping search in 2011, though, (see: new Gist search), so I wouldn't be
surprised if he just improves all the things.

~~~
oozcitak
Even though public repositories lack a search box, they are still searchable
by adding /search?q=$keyword to the url:

<https://github.com/ry/node/search?q=runshell>

~~~
glenjamin
Are there any greasemonkey gurus out there who could write a script which adds
a box for this onto public pages?

------
shiftb
That's so awesome. I've wanted this forever.

------
St-Clock
Next (desired) feature in the pipeline: online vim on top of github.

And no, I don't think Bespin/Skywriter/Ace is good enough right now.

~~~
windsurfer
I wonder how one could make money with a javascript version of Vim...

~~~
koenigdavidmj
Well, <http://code.google.com/p/emscripten/> is a converter from LLVM to C.
Build an ncurses wrapper around one of the many JavaScript terminal emulators,
and hook all the file I/O into Dropbox, and it should not be particularly
difficult.

------
ludwigvan
For emacs, I use the following:

1\. I create a TAGS file with exuberant _ctags_ (not the default etags - note
that both have a file called etags, to find out which one you have, issue
`etags -v`.).

2\. Use the _ido-find-file-in-tag-files_ mentioned here:
<http://www.emacswiki.org/emacs/TextMate> Answer 3, mapped to `C-x C-g`.

This might be a bad choice due to C-g, but it's close to C-x C-f, so I prefer
that.

------
edsrzf
That's a great feature for bigger projects.

I would love to see a similar grep-type feature, where I can quickly search
through the files in a repository for text. (Yes, I know there's advanced
search, but that's so disruptive to my code reading.)

------
ollysb
Is github going to be textmate 2?

~~~
steveklabnik
Even _ Allan Odgaard_ is working for GitHub now?

More seriously, I wonder if this would be an interesting direction for GitHub
to move in; sorta picking up where Heroku left off. They already do let you
edit files via the web, it'd just be keybindings... and a ton of other details
since I know nothing of GitHub's internals.

In fact, that's probably a terrible idea. But something to think about...

------
LiveTheDream
Wow, really well implemented! Normally I git clone, open the repo in vim, then
use ack.

Github also has very good keyboard shortcuts in the Issues section. Gmail
shortcut users will feel right at home.

------
ollysb
I'm so blown away by this it makes me want to ask for another one, ack in
project? :)

------
tonywok
Oh I just want to give github the biggest bear hug. You guys rock.

------
dirtyhand
Github just beat the internet

------
EGreg
EPIC WIN!

