»

Here comes Google Code Search

Did anyone ever use Krugle? You don’t need to anymore..

5 Responses to “Here comes Google Code Search”

  1. Alex says:

    how about you write us a nice plugin for TextMate to see in a snippet some sample code?

    Your old friend …

  2. cosmix says:

    Salut Alex!

    Naaah, I don’t think I’ll bother. I think it needs more than just a snippet, as you get lots of information from the context/project/etc on the page. I guess what might be possible, is some sort of webcore popup (ala Ctrl-H for help), but then again I am not sure that’s really worth it.

    Si tu as vraiment besoin de cette fonctionalite, tu pourrais developper le plugin, non? En plus, ca va etre un bon exercise de programmation pour toi!

    A bientot. :)

  3. Alex says:

    tu sais bien que je préfère faire faire les exercices par les autres. ;)

  4. Alex says:

    here is what i suggest :
    —–
    scope=$TM_SCOPE;
    lang=${scope/#*./} ;
    open http://www.google.com/codesearch?q=$TM_CURRENT_WORD+lang:$lang
    —–
    with input none and output discard :)

  5. cosmix says:

    Excellent. Although, do you really think this is useful? Point being that I’d rarely search based on a selected word/term/statement in the source code, while coding. I’d probably do it during design and I would probably have some contextual information in the search string: e.g. ‘fibonacci series’ or ‘email class perl’. Still, I am sure some fellow TextMate users will find this useful!

    P.S.: You may want to check for ‘source’ in the first part of the scope, to minimise the possibility of invalid lang searches :)

Have your say.

Write in the language of the post. Comments are meant to encourage on-topic discussion. For general comments, observations, complaintsd (e.g. about the site), you can use the form found in the Contact page. Make sure you've read the Terms of Use before commenting.

Comments Feed for this post Comments Feed for this entry.

Download Spinalonga's Podsafe rock music for your podcast. From Athens, Greece, with love.'