如何让 Textmate 始终忽略“在项目中查找”中的 /log 文件夹?搜索?

发布于 2024-10-11 15:21:36 字数 46 浏览 3 评论 0原文

如何让 Textmate 在“在项目中查找”搜索中始终忽略 /log 文件夹?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

玉环 2024-10-18 15:21:36

log 文件夹添加到 ~/.tm_properties 文件中的 excludeInFolderSearch 选项,例如:

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

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

excludeInFolderSearch = "{$excludeInFolderSearch,$extraExcludes,log}" 
笑饮青盏花 2024-10-18 15:21:36

我找到了一种更简单的方法。

转到设置>高级>文件夹引用

并添加 |log|到图案。

  • 适用于 TextMate 1

I found a easier way to do it.

Go to Settings > Advanced > Folder References

And add |log| to the pattern.

  • valid for TextMate 1
屋檐 2024-10-18 15:21:36

其他答案在 TextMate 2.0-beta.12 上对我不起作用。经过多次令人沮丧的尝试后,这一行能够从模糊搜索中排除 log、vendor、tmp 和 .git 目录。

excludeInFileChooser = "{$excludeInFileChooser,log,vendor,tmp,.git}"

我将此行添加到项目目录中的 .tm_properties 文件中。我验证了如果您决定将 .tm_properties 放在主目录中,这也有效。

编辑:

使用 excludeInFileChooser 修改 Textmate 的“转到文件”导航功能中的搜索路径,该功能由 ⌘T 激活。

在目录文件中搜索文本时,使用 excludeInFolderSearch 修改路径,该目录由 ⌘F⌘↑ 激活F

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

空宴 2024-10-18 15:21:36

这些都不适合我。有效的方法是在 .tm_properties 文件(项目根目录)中添加以下内容,

excludeDirectories = "{node_modules,}"

没有 $exclude 变量。添加尾随逗号。

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.

鸠书 2024-10-18 15:21:36

对于Textmate 2

点击顶部菜单Textmate,然后点击首选项

导航到第二个选项卡,名为项目

在“排除匹配的文件”上,只需将“log”添加到列表末尾,例如:

{*.{o,pyc},Icon\r,CVS,_darcs,_MTN ,\{arch\},blib,*\~.nib,tmp,log}

这应该可以,log 文件夹不应再被搜索,或在打开时用作匹配一个文件。

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.

醉城メ夜风 2024-10-18 15:21:36

使用AckMate、https://github.com/protocool/AckMate和read hot来改变正常的Find in项目 Shift+Cmd+F 位于 github.com/protocool/AckMate/wiki/Usage

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

离线来电— 2024-10-18 15:21:36

对于 TextMate2,它应该是: excludeDirectories = "{$excludeDirectories,log}"

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

风轻花落早 2024-10-18 15:21:36

或者,您可以明确告诉 Mate 查看特定的文件夹子集。

~/project/mate app db models

项目查找将仅限于这些文件夹。

或者,要删除日志目录,您可以向 ~/.profile 添加别名:

alias m="ls | grep -v 'log' | xargs mate"

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"
好听的两个字的网名 2024-10-18 15:21:36

只需从项目树中删除对日志文件夹的引用即可。

您也可以右键单击 *.log 文件并将其标记为二进制(不会搜索它们)。

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文