Searching Haml and SASS with ack

Reference
update
only thing is about the format and there are set and add.


If, like me, you've recently discovered the wonderful speed of the ack search tool, you may be frustrated to find that it ignores some of your source code. Files that you know should be appearing in your search results just don't show up, as ack doesn't consider .haml or .scss files to be worth searching. Well, we can fix that.

Ack has a list of "types" of text that it will search for your phrase, such as "HTML" or "C source code". Each type corresponds to one or more filename extensions. For example, .htm, .html, .shtml and .xhtml files are considered to contain HTML, and .c, .h and .xs are recognised as C source.

To see the full list of types, enter:

$ ack --help types


If you want to tell ack to search your .haml, .sass and .scss files as well, you can configure it with the ~/.ackrc file:

#cat ~/.ackrc
--type-set=haml=.haml
--type-set=sass=.sass
--type-set=coffee=.coffee
--type-add=ruby=.haml
--type-add=js=.coffee
--type-add=css=.sass,.scss


For more info see the ack man page (which you can read by typing ack --man if man ack can't find it).

你可能感兴趣的:(html,vim,haml,ack)