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.)
with vim, NERDTree, ack, and gem edit: once you `gem edit` and the directory list opens, go to the directory listing (e.g. /Users/you/.rvm/gems/ruby-1.9.2-p136/gems/twitter-1.1.1/) and type "cd". This changes your current working directory to the gem root, which in turn allows you to `:Ack some_text` from the gem root which is very useful.
Surely you don't get the same level of organisation (particularly hierarchical) by having everything in one file? And doesn't that mean you are constantly scanning up and down the file?
"Search" is my friend to move around in my one big file.
I think of it like a the same shift introduced by Google Mail with their "label" thing. At the time it was quite disturbing, we used to classify mails in hierarchical directories. Nowadays, when I want to retrieve a msg, do I navigate a directory structure? No. I just "search".
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. :)
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.
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:
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.
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.
I find it handy. Often I'll want to look at a file, but can't recall the exact name or location. I have a shell script that does a find, skipping certain things, and matching on some parameters.
I can also tell it to open what it finds in vim.
But I probably use the "grep files of a certain type for a certain string and open them in vim" version more often.
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.
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`.).
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...
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.)
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.)