TextMate reigns supreme with ‘Ack in Project’

The one thing holding TextMate back from Ruby / Rails domination is its horribly slow search functionality. Using ‘Search in Project’ will take what seems like an eternity to pop up any results. The only real attempt at solving this headache was to use ‘Grep in Project’, but it left a lot to be desired including search speed. Now comes the solution, ‘Ack in Project’ was a project created on GitHub back in August to use the much more efficient Ack library for searching. With enhanced output, it has given other IDEs like NetBeans and IntelliJ a swift quick to the balls as to what is the best Ruby / Rails editor.

[sourcecode language="shell"]
$ cd /Applications/TextMate.app/Contents/SharedSupport/Bundles/
$ sudo git clone git://github.com/protocool/ack-tmbundle.git Ack.tmbundle
[/sourcecode]

Use Ack in Project with Cmd+Shift+A



18 Responses to “TextMate reigns supreme with ‘Ack in Project’”

  1. Micah Says:

    I’m a big Vim user, but I recently started learning Ruby on Rails and tried out Textmate. I can’t get past not having the Vim keybindings. Are there any bundles for modal editing?

  2. Ashley Williams Says:

    Thats very cool, thanks a lot! ;)

  3. combatwombat Says:

    Cool.
    But better copy it to your Library folder:

    cd ~/Library/Application\ Support/TextMate/Bundles/

  4. Noah Says:

    You should really be saving bundles in ~/Library/Application Support/TextMate/Bundles instead of inside the application itself.

  5. Delboy Says:

    This was added as a plugin in Vim over a year and a half ago.

  6. stask Says:

    Hi,
    Thanks for the tip.

    Doesn’t installing in /Applications/TextMate.app/Contents/SharedSupport/Bundles means that if you reinstall or upgrade TextMate, the Ack bundle will be lost?

    I installed it in ~/Library/Application Support/TextMate/Bundles.

    /stask

  7. A Fresh Cup » Blog Archive » Double Shot #302 Says:

    [...] TextMate Reigns Supreme with ‘Ack in Project’ – Very fast full-project search bundle for TextMate. [...]

  8. Luke Redpath Says:

    Is there any reason to put this inside the TextMate.app folder? Wouldn’t ~/Library/Application Support/TextMate/Bundles be better?

  9. Jean-Francois Couture Says:

    While the speed is impressive compared to grep in project (I just did quick test), it suffers from the same fatal flaw: it does not honor my project settings. I normally exclude the logs and everything in the vendor directory in a rails project, I only want to search in my code. I’m not familiar with how textmate bundles works, but is that something that would be hard to implement?

  10. Justin Smestad Says:

    I prefer to copy it into the Application directory so that all users use the bundle instead of a user specific setting. Also then doing a copy / paste restore from Time Machine will keep my packages.

    In response to the fatal flaw. You can setup a .ackrc (or something of the name) for per-project or per-user settings for omissions such as logs and vendor/plugins.

  11. Alderete Says:

    @Justin Smestad: I don’t suppose you could post an example file for doing this…?

  12. Andy Lester Says:

    @Justin Smestad: There is no per-project .ackrc support, yet. Yet.

  13. Graham Ashton Says:

    @Jean-Francois Couture – it works for me (i.e. it doesn’t find things in my log directory, which my TextMate project is configured to ignore).

  14. Justin Smestad Says:

    @Andy Lester: sorry to say that there is ;) http://github.com/protocool/ack-tmbundle/wikis/recognizing-files

  15. Marcus Says:

    Wow. That is excessively fast. Nice interface too.

    Oh and did anyone mention that you should put bundles in…. yeah. Right.

  16. Sean Eby Says:

    Awesome. Works very well. I like “Grep in Project” but this is a nice step beyond that.

  17. เร็วส์ หกสิบหก » นั่งเทียนเขียนข่าว#14 Says:

    [...] TextMate reigns supreme with ‘Ack in Project’ | eval(code) [...]

  18. justin Says:

    What are the options for configuring ack? I tried adding a new extension to my .ackrc file but it did not pick up that change. Tried reloading TextMate, still no dice. I’d also like to set it up to exclude my log files but don’t know how.

Leave a Reply