razenha
razenha

Reputation: 7742

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

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

Upvotes: 36

Views: 7426

Answers (9)

Pedro Coutinho
Pedro Coutinho

Reputation: 155

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.

Upvotes: 3

David Morales
David Morales

Reputation: 18064

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

Upvotes: 1

Anthony To
Anthony To

Reputation: 2303

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

Upvotes: 10

phillyslick
phillyslick

Reputation: 571

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.

Upvotes: 5

razenha
razenha

Reputation: 7742

I found a easier way to do it.

Go to Settings > Advanced > Folder References

And add |log| to the pattern.

  • valid for TextMate 1

Upvotes: 19

rkusa
rkusa

Reputation: 4902

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

excludeInFolderSearch = "{$excludeInFolderSearch,$extraExcludes,log}" 

Upvotes: 36

nazar kuliyev
nazar kuliyev

Reputation: 1265

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

Upvotes: 0

Allyl Isocyanate
Allyl Isocyanate

Reputation: 13626

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"

Upvotes: 0

jnstq
jnstq

Reputation: 51

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

Upvotes: 2

Related Questions