How can I make Textmate always ignore the /log folder in the "Find in Project" search?
9 Answers
Add the log folder to the excludeInFolderSearch
option in your ~/.tm_properties
file, e.g.:
excludeInFolderSearch = "{$excludeInFolderSearch,$extraExcludes,log}"

- 4,792
- 1
- 22
- 28
-
5Note that you may also place a `.tm_properties` file with project-specific settings such as this in your project directory. – Julian D. Oct 19 '13 at 15:46
-
1This did not work for me on TextMate 2.0-beta.12. Please see my answer for a different solution. – Anthony To Aug 14 '16 at 01:08
-
1This should be `excludeDirectories = "{$excludeDirectories,log}"` – David Morales Nov 08 '17 at 18:21
I found a easier way to do it.
Go to Settings > Advanced > Folder References
And add |log| to the pattern.
- valid for TextMate 1

- 7,660
- 6
- 37
- 53
-
1After you change the prefs reopen the project and log files will be filtered. – Krešimir Prcela Sep 28 '12 at 11:16
Other answers did not work for me on TextMate 2.0-beta.12. After many frustrating attempts, this line was able to exclude the log, vendor, tmp and .git directories from fuzzy searching.
excludeInFileChooser = "{$excludeInFileChooser,log,vendor,tmp,.git}"
I added this line to a .tm_properties
file in my project directory. I verified that this also works if you decide to put the .tm_properties
in the home directory.
Edit:
Use excludeInFileChooser
for modifying search paths in Textmate's "Go To File" navigation feature, which is activated by ⌘T
.
Use excludeInFolderSearch
for modifying paths when searching for text within the files of a directory, which is activated by either ⌘F
or ⌘↑F

- 2,193
- 2
- 21
- 29
None of these worked for me. What worked was adding the following in a .tm_properties file (project root)
excludeDirectories = "{node_modules,}"
No $exclude
variable. Add trailing comma.

- 571
- 6
- 12
For Textmate 2:
Click on the top menu Textmate, then Preferences.
Navigate to the second tab, called Projects.
On the "Exclude files matching" just add 'log' to the end of the list, for example:
{*.{o,pyc},Icon\r,CVS,_darcs,_MTN,\{arch\},blib,*\~.nib,tmp,log}
This should do it, the log
folder should no longer be searched, or used as match when opening a file.

- 156
- 1
- 5
Use AckMate, https://github.com/protocool/AckMate and read hot to change the normal Find in Project Shift+Cmd+F here github.com/protocool/AckMate/wiki/Usage

- 51
- 4
Just remove reference to log folder from project tree.
Also you may right click on *.log files and mark then as binary (they will not be searched).

- 1,215
- 1
- 12
- 13
For TextMate2 it should be: excludeDirectories = "{$excludeDirectories,log}"

- 17,816
- 12
- 77
- 105
Alternatively you could explicitly tell Mate to look at a specific subset of folders.
~/project/mate app db models
Project find will be restricted to those folders.
Or to just remove the log dir you could add an alias to ~/.profile:
alias m="ls | grep -v 'log' | xargs mate"

- 13,306
- 17
- 79
- 130