Majulah Segenap Open Source Indonesia! Industry world and Education world must be united!

]]>https://ariekusumaatmaja.wordpress.com/2009/08/21/id-ruby-strikes-to-campus-again-after-ittelkom-bandung-west-java-indonesia-last-year-this-year-would-be-at-universitas-nasional-jakarta-national-university-indonesia/feed/2arieRuby Spotlight Plugin is A Must! A Solution to Find Ruby Codes in Many Ruby Fileshttps://ariekusumaatmaja.wordpress.com/2009/08/15/ruby-spotlight-plugin-is-a-must-a-solution-to-find-ruby-codes-in-many-ruby-files/
https://ariekusumaatmaja.wordpress.com/2009/08/15/ruby-spotlight-plugin-is-a-must-a-solution-to-find-ruby-codes-in-many-ruby-files/#respondFri, 14 Aug 2009 18:24:50 +0000http://ariekusumaatmaja.wordpress.com/?p=610Have you ever wondered if you can search a piece of ruby codes inside all your gigantic macbook pro storage?

For example, you might want to search one of your codes that contains this code module AdpointDir

How would you do that? From a command line? Yes, that’s one option. Another option is: Ruby Importer

What I do to search that code on my 13″ Macbook Pro is just press Apple Command + Space to invoke Spotlight on the top right of my Mac OS X 10.5.8 Leopard Desktop. Then just type there module AdpointDir.

That’s one way to reach the file. Another way is using mdfind “module AdpointDir”.

This spotlight is really a must for a Serious Rubyist on Leopard! As we know since Leopard, we really rely on Spotlight, I even don’t need to have “QuickSilver” anymore to call my apps quickly because it’s been already indexed well on spotlight, anyway.

What I did to have this was after downloading the plugin from here I placed RubyImporter.mdimporter file to my ~/Library/Spotlight, there wasn’t Spotlight directory over there, I just created it by myself.

Then I opened my Terminal, go to that directory ~/Library/Sportlight/ and typed mdimport -L | grep Ruby and I saw RubyImporter on the list!

So what I did after that was tell my mac to re-index all Ruby files with this command:

Notes: I wrote this blog post intentionally because I wasn’t clear enough of README from RubyImporter. I hope this write-up makes me (and my ruby fellows around me) more clear. When I need to search my piece of codes in a smaller, more reasonable environments, for example inside one of Rails or Ruby projects, {1} I can just enter ViM, then type :vimgrep /regexp/ . to get what I want. Or, {2} do Apple Command + Shift + F to search my piece of code in my whole ruby projects that I opened using my Textmate.