Find in Folder Globs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Find in Folder Globs

Rob McBroom-4

Looking at the code, TextMate appears to start with a list taken from “Find in Folder Globs.default”, which doesn’t exist, so it falls back to hard-coded defaults.

I find myself adding the same patterns to almost every project so I’d like to change the defaults.

Is there a way to set that via .tm_properties or do I just have to add a key named “default” to com.macromates.TextMate.plist manually?

Thanks.

--
Rob McBroom
http://www.skurfer.com/



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Find in Folder Globs

Graham Heath
What is your goal with changing the default? Could it be accomplished with excludeInFileChooser, excludeInBrowser, and/or excludeInFolderSearch?


Thanks, 

Graham

On July 28, 2017 at 8:31:14 AM, Rob McBroom ([hidden email]) wrote:

Looking at the code, TextMate appears to start with a list taken from “Find in Folder Globs.default”, which doesn’t exist, so it falls back to hard-coded defaults.

I find myself adding the same patterns to almost every project so I’d like to change the defaults.

Is there a way to set that via .tm_properties or do I just have to add a key named “default” to com.macromates.TextMate.plist manually?

Thanks.

--
Rob McBroom
http://www.skurfer.com/


_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Find in Folder Globs

Rob McBroom-4

On 2 Aug 2017, at 10:32, Graham Heath wrote:

What is your goal with changing the default? Could it be accomplished with
excludeInFileChooser, excludeInBrowser, and/or excludeInFolderSearch?

I know about those and use them regularly.

I’m talking about the list of extensions that appears next to “matching” in the Find/Replace window. By default, it includes *, *.txt, and *.{c,h}.

It would be nice if I could have every new project include other things by default, like *.py or *.html since I always end up adding them anyway.

--
Rob McBroom
http://www.skurfer.com/



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Find in Folder Globs

Ronald Wampler
In reply to this post by Rob McBroom-4
On Fri, Jul 28, 2017 at 9:30 AM, Rob McBroom <[hidden email]> wrote:

> Looking at the code, TextMate appears to start with a list taken from “Find
> in Folder Globs.default”, which doesn’t exist, so it falls back to
> hard-coded defaults.
>
> I find myself adding the same patterns to almost every project so I’d like
> to change the defaults.
>
> Is there a way to set that via .tm_properties or do I just have to add a key
> named “default” to com.macromates.TextMate.plist manually?
>

No, the default values cannot be changed. But since `OakHistoryList` stores the
values (per project) in the plist, so it makes sense to me to have it store
"defaults" values there too such that you can set them via:

defaults write com.macromates.TextMate "Find in Folder Globs"
-dict-add default '("*", "*.py", "*.html")'

I think that should be a straight forward change, if you're interested in
submitting a PR.

Ron

> Thanks.
>
> --
> Rob McBroom
> http://www.skurfer.com/
>
>
>
> _______________________________________________
> textmate mailing list
> [hidden email]
> http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Find in Folder Globs

Rob McBroom-4
On 2 Aug 2017, at 12:12, Ronald Wampler wrote:

> No, the default values cannot be changed. But since `OakHistoryList`
> stores the
> values (per project) in the plist, so it makes sense to me to have it
> store
> "defaults" values there too such that you can set them via:
>
> defaults write com.macromates.TextMate "Find in Folder Globs"
> -dict-add default '("*", "*.py", "*.html")'

I believe you can already do that.

https://github.com/textmate/textmate/blob/master/Frameworks/Find/src/FindWindowController.mm#L264

I initially asked if I just needed to add the data to the prefs
manually. It sounds like the answer is “yes”.

Thanks!

--
Rob McBroom
http://www.skurfer.com/

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Loading...