Skip to content
This repository

If you’re already familiar with ack and you know what goes in a .ackrc file then you can probably just jump straight to the Usage page. Otherwise, read on…

What’s AckMate (and ack) good for?

99% of the time that I use “Find in Project”, I’m not interested in bulk text replacement: I just want to find some text, and fast.

Ack is about as fast as you can get. Much of ack’s speed is down to the fact that it doesn’t search every single file or directory in your tree, just the ones that ack thinks are probably interesting.

You don’t have to worry about that 500MB log file slowing your searches down.

Okay, fast is good. What’s the catch?

Well, the catch is if you’ve got a file called (for example) show.haml in your project then ack will skip that file because it doesn’t know about .haml files.

So the fact that you can edit the file in TextMate doesn’t guarantee AckMate will search for text in that file.

Ouch. Is there a way to fix that?

Yes – you tell ack about the files you’re interested in, via command-line arguments.

To make things easier, you can create a file called .ackrc in your home directory which will contain all of the command-line arguments you’d like ack to use by default.

Here’s what it would look like if you wanted files with a .haml extension to be considered a ‘ruby’ file:


--type-add=ruby=.haml

Here’s another example – from my own .ackrc file:


--type-add=objc=.pch
--type-set=xcode=.pbxproj,.pbxuser,.perspectivev3
--type-set=ragel=.rl
--type-set=nib=.xib
--type-set=plist=.plist
--type-set=tmstuff=.tmproj,.tm_build_errors
--nonib
--notmstuff
--noxcode

Note the last 3 lines. Some of the filetypes I’ve set up should not be searched by default so I switch them off.

If I decide that I really do want to search my .xib files, I can add a --nib command line argument when running ack to override the default.

But .haml files are pretty common. Can’t you add that as a default in AckMate?

No.

If you want to change ack’s default behavior then you’re going to have to petition Andy Lester (the author of ack) about your change. The github repo for ack is: http://github.com/petdance/ack

Can I use my private fork of ack with AckMate?

No.

The version of ack that ships with AckMate has been modified specifically for AckMate.

I will track changes to the official ack distribution and merge those into AckMate’s version, but I will not entertain any requests to change the core ack behavior in any way.

Something went wrong with that request. Please try again.