"Use TextMate folder references" doesn't work
acdha opened this issue · 13 comments
My global TextMate folder patterns and the project's folder patterns both exclude a directory named coverage. I have "Use TextMate folder references" checked but this directory is still included in search results unless I add "--ignore-dir=coverage" to my options.
Hey,
I just double-checked and it's working in my build - perhaps if you include your folder-pattern regex I'll be able to see what the problem is.
Regards, Trev
My pattern is below - it works in TextMate's project drawer and the built-in search:
!.*/(\.[^/]*|coverage|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle|eggs|parts|develop-eggs))$
Okay, this is odd: after you noting that it worked in the current build, I reinstalled version 1.1.1 (complete with a "Do you want to replace version 1.1.1 with version 1.1.1?" prompt) and it's now working.
Well that's really odd...
Is this the first time you restarted textmate since you noticed the problem? I can't see how reinstalling the plugin would help anything beyond clearing out state because of a restart.
(I'm not saying a restart is or should be required, just that it's the only aspect of the plugin reinstall that would reasonably affect this)
Trev
No - I restarted TextMate multiple times while checking that this morning as I thought it was possible that AckMate might have been loading that preference at start.
I'll try on my other computer and see if the problem reproduces
I am experiencing the same issue. I was on 1.1.0 but after reading this thread I upgraded to 1.1.1. I have a project file exclusion that is not being honored by AckMate. If I use any of TextMate's file-related actions (global search, go to file, etc) then my file exclusion rule is being respected as expected.
I tried moving the file exclusion rule from the project level to the textmate preferences, but that didn't help. I relaunched textmate after every time I edited the exclusion rules.
This is my rule:
!(..db.?.|cached.*.(js|css))$
Hi Justin,
it looks as though your exclusion rule is for matching files (unless you're creating directories named something.js and something.css).
The TextMate folder references setting is for ignoring directories, not specific files.
If you want to exclude files then the mechanism is different. For example: to exclude javascript files, you would specify nojs in AckMate's options field. If that's something you want to do by default, then you add a --nojs line to your $HOME/.ackrc file.
Regards, Trev
So you are saying that AckMate does not respect TextMate's file exclusions? Either at the project level or app level, you can exclude files in much the same way you can exclude directories.
Correct - AckMate purposefully ignores the file exclusions settings because a) they are less useful than ack's own filetypes mechanism and b) TextMate doesn't expose the per-project settings for file/folder exclusions so there's no way for me to know the per-project exclusions anyhow.
Well that is unfortunate. I'd put my file exclusions at the application level if it would work with AckMate. Can I exclude files in AckMate with a regex like I can in TextMate? I have a certain naming convention for JavaScript/CSS files that I want to exclude. Simply excluding all files of type=.js is not appropriate.
Unfortunately no, ack itself doesn't allow you to exclude files based on a regex of their name.
There is a -G option but that's an inclusion regex, not an exclusion one.
Sorry, Trev
I'm having this problem with 1.1.2. I'm not worrying about files, but trying to exclude directories. It keeps searching in the templates_c folder, while find in project ignores it correctly. The only thing I can think of is that I'm specifying an actual path to a folder (not just its name) in some instance.
!./(.[^/]|CVS|darcs|MTN|{arch}|blib|.~.nib|..(framework|app|pbproj|pbxproj|xcode(proj)?|bundle)|htdocs-admin|htdocs-callcenter|htdocs/resources|templates_c|templates/mycompany/callcenter|templates/mycompany/admin|elements/callcenter|elements/admin)$
ahh wait, I see. you don't/can't respect the per-project exclusions. nvm :)