35

How can I make Textmate always ignore the /log folder in the "Find in Project" search?

razenha
  • 7,660
  • 6
  • 37
  • 53

9 Answers9

36

Add the log folder to the excludeInFolderSearch option in your ~/.tm_properties file, e.g.:

excludeInFolderSearch = "{$excludeInFolderSearch,$extraExcludes,log}" 
rkusa
  • 4,792
  • 1
  • 22
  • 28
19

I found a easier way to do it.

Go to Settings > Advanced > Folder References

And add |log| to the pattern.

  • valid for TextMate 1
razenha
  • 7,660
  • 6
  • 37
  • 53
9

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

Anthony To
  • 2,193
  • 2
  • 21
  • 29
5

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.

phillyslick
  • 571
  • 6
  • 12
3

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.

Pedro Coutinho
  • 156
  • 1
  • 5
2

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

jnstq
  • 51
  • 4
0

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).

http://wiki.macromates.com/Troubleshooting/FindInProject

nazar kuliyev
  • 1,215
  • 1
  • 12
  • 13
0

For TextMate2 it should be: excludeDirectories = "{$excludeDirectories,log}"

David Morales
  • 17,816
  • 12
  • 77
  • 105
0

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"
Allyl Isocyanate
  • 13,306
  • 17
  • 79
  • 130