Hi,
Is there a function to make TextMate 2 opens a certain file type using a specific theme? e.g. there is the default theme and then you can set TM to open html files using another theme.
Best, u
PS: I need it!! I do not know why only few Text Editors have this feature…
On 23 Aug 2019, at 7:45, Umberto Cerrato wrote:
Is there a function to make TextMate 2 opens a certain file type using a specific theme? e.g. there is the default theme and then you can set TM to open html files using another theme.
This is what I have in `~/.tm_properties` to make certain types open with a light theme.
~~~ini [ text.plain,text.html,text.mail ] theme = "3A9E8876-6DBD-4696-871F-95D340F8BA27" ~~~
As you can see, you need to provide the UUID for the theme, not the name.
Thank you Rob, I’ll try asap!
Best
Il giorno 23 ago 2019, alle ore 14:14, Rob McBroom mailinglist0@skurfer.com ha scritto:
On 23 Aug 2019, at 7:45, Umberto Cerrato wrote:
Is there a function to make TextMate 2 opens a certain file type using a specific theme? e.g. there is the default theme and then you can set TM to open html files using another theme.
This is what I have in ~/.tm_properties to make certain types open with a light theme.
[ text.plain,text.html,text.mail ] theme = "3A9E8876-6DBD-4696-871F-95D340F8BA27" As you can see, you need to provide the UUID for the theme, not the name.
-- Rob McBroom
TextMate mailing list TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Hi,
I found the Global.tmProperties file. It does work. This is my “configuration”:
[ source.c ] theme = "71D40D9D-AE48-11D9-920A-000D93589AF6" tabSize = 4
However, I didn’t manage to have this configuration to work for other formats too. e.g. [ *.c,*.cpp ] does not work neither do [ source.c, source.cpp ] and [ text.c, text.cpp ]. What am I missing?
Best, u
Il giorno 23 ago 2019, alle ore 15:11, Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it> ha scritto:
Thank you Rob, I’ll try asap!
Best
Il giorno 23 ago 2019, alle ore 14:14, Rob McBroom <mailinglist0@skurfer.commailto:mailinglist0@skurfer.com> ha scritto:
On 23 Aug 2019, at 7:45, Umberto Cerrato wrote:
Is there a function to make TextMate 2 opens a certain file type using a specific theme? e.g. there is the default theme and then you can set TM to open html files using another theme.
This is what I have in ~/.tm_properties to make certain types open with a light theme.
[ text.plain,text.html,text.mail ] theme = "3A9E8876-6DBD-4696-871F-95D340F8BA27" As you can see, you need to provide the UUID for the theme, not the name.
-- Rob McBroom
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Hello,
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
Hope it will be useful to someone :)
Best
Il giorno 23 ago 2019, alle ore 15:51, Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it> ha scritto:
Hi,
I found the Global.tmProperties file. It does work. This is my “configuration”:
[ source.c ] theme = "71D40D9D-AE48-11D9-920A-000D93589AF6" tabSize = 4
However, I didn’t manage to have this configuration to work for other formats too. e.g. [ *.c,*.cpp ] does not work neither do [ source.c, source.cpp ] and [ text.c, text.cpp ]. What am I missing?
Best, u
Il giorno 23 ago 2019, alle ore 15:11, Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it> ha scritto:
Thank you Rob, I’ll try asap!
Best
Il giorno 23 ago 2019, alle ore 14:14, Rob McBroom mailinglist0@skurfer.com ha scritto:
On 23 Aug 2019, at 7:45, Umberto Cerrato wrote:
Is there a function to make TextMate 2 opens a certain file type using a specific theme? e.g. there is the default theme and then you can set TM to open html files using another theme.
This is what I have in ~/.tm_properties to make certain types open with a light theme.
[ text.plain,text.html,text.mail ] theme = "3A9E8876-6DBD-4696-871F-95D340F8BA27" As you can see, you need to provide the UUID for the theme, not the name.
-- Rob McBroom
_______________________________________________ TextMate mailing list TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a [file system glob](https://macromates.com/textmate/manual/references#glob-string), which is what you currently use, but the one above also match files like `fooc` and `foocpp` (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be `source.c` and `source.c++`, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a `.c` or `.cpp` extension.
Hi,
Yeah I knew that and in my properties file I wrote like you did. I already sent the mail then. Anyway thank you.
About the source, I didn’t know that! (About it can match the language also if the extension is different) And I didn’t know you can list them all together with quotes neither.
Thanks
U
Il giorno 26 ago 2019, alle ore 10:01, Allan Odgaard mailinglist@textmate.org ha scritto:
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a file system glob, which is what you currently use, but the one above also match files like fooc and foocpp (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be source.c and source.c++, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a .c or .cpp extension.
TextMate mailing list TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
PS:
This seems to work too...
[ 'source.*{c, c++, python}' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
Il giorno 26 ago 2019, alle ore 11:56, Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it> ha scritto:
Hi,
Yeah I knew that and in my properties file I wrote like you did. I already sent the mail then. Anyway thank you.
About the source, I didn’t know that! (About it can match the language also if the extension is different) And I didn’t know you can list them all together with quotes neither.
Thanks
U
Il giorno 26 ago 2019, alle ore 10:01, Allan Odgaard <mailinglist@textmate.orgmailto:mailinglist@textmate.org> ha scritto:
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a file system glob, which is what you currently use, but the one above also match files like fooc and foocpp (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be source.c and source.c++, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a .c or .cpp extension.
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Inizio messaggio inoltrato:
Da: Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it>
Oggetto: [TxMt] Re: Different Themes based on file type
Data: 26 agosto 2019 11:56:47 CEST
A: "[textmate]" <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Rispondi a: TextMate users <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Hi,
Yeah I knew that and in my properties file I wrote like you did. I already sent the mail then. Anyway thank you.
About the source, I didn’t know that! (About it can match the language also if the extension is different) And I didn’t know you can list them all together with quotes neither.
Thanks
U
Il giorno 26 ago 2019, alle ore 10:01, Allan Odgaard <mailinglist@textmate.orgmailto:mailinglist@textmate.org> ha scritto:
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a file system glob, which is what you currently use, but the one above also match files like fooc and foocpp (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be source.c and source.c++, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a .c or .cpp extension.
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Inizio messaggio inoltrato:
Da: Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it>
Oggetto: [TxMt] Re: Different Themes based on file type
Data: 26 agosto 2019 11:56:47 CEST
A: "[textmate]" <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Rispondi a: TextMate users <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Hi,
Yeah I knew that and in my properties file I wrote like you did. I already sent the mail then. Anyway thank you.
About the source, I didn’t know that! (About it can match the language also if the extension is different) And I didn’t know you can list them all together with quotes neither.
Thanks
U
Il giorno 26 ago 2019, alle ore 10:01, Allan Odgaard <mailinglist@textmate.orgmailto:mailinglist@textmate.org> ha scritto:
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a file system glob, which is what you currently use, but the one above also match files like fooc and foocpp (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be source.c and source.c++, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a .c or .cpp extension.
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Inizio messaggio inoltrato:
Da: Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it>
Oggetto: [TxMt] Re: Different Themes based on file type
Data: 26 agosto 2019 11:56:47 CEST
A: "[textmate]" <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Rispondi a: TextMate users <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Hi,
Yeah I knew that and in my properties file I wrote like you did. I already sent the mail then. Anyway thank you.
About the source, I didn’t know that! (About it can match the language also if the extension is different) And I didn’t know you can list them all together with quotes neither.
Thanks
U
Il giorno 26 ago 2019, alle ore 10:01, Allan Odgaard <mailinglist@textmate.orgmailto:mailinglist@textmate.org> ha scritto:
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a file system glob, which is what you currently use, but the one above also match files like fooc and foocpp (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be source.c and source.c++, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a .c or .cpp extension.
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Inizio messaggio inoltrato:
Da: Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it>
Oggetto: [TxMt] Re: Different Themes based on file type
Data: 26 agosto 2019 11:56:47 CEST
A: "[textmate]" <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Rispondi a: TextMate users <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Hi,
Yeah I knew that and in my properties file I wrote like you did. I already sent the mail then. Anyway thank you.
About the source, I didn’t know that! (About it can match the language also if the extension is different) And I didn’t know you can list them all together with quotes neither.
Thanks
U
Il giorno 26 ago 2019, alle ore 10:01, Allan Odgaard <mailinglist@textmate.orgmailto:mailinglist@textmate.org> ha scritto:
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a file system glob, which is what you currently use, but the one above also match files like fooc and foocpp (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be source.c and source.c++, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a .c or .cpp extension.
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Inizio messaggio inoltrato:
Da: Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it>
Oggetto: [TxMt] Re: Different Themes based on file type
Data: 26 agosto 2019 11:56:47 CEST
A: "[textmate]" <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Rispondi a: TextMate users <textmate@lists.macromates.commailto:textmate@lists.macromates.com>
Hi,
Yeah I knew that and in my properties file I wrote like you did. I already sent the mail then. Anyway thank you.
About the source, I didn’t know that! (About it can match the language also if the extension is different) And I didn’t know you can list them all together with quotes neither.
Thanks
U
Il giorno 26 ago 2019, alle ore 10:01, Allan Odgaard <mailinglist@textmate.orgmailto:mailinglist@textmate.org> ha scritto:
On 23 Aug 2019, at 16:14, Umberto Cerrato wrote:
I found a solution.
[ *{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The thing in the square brackets is a file system glob, which is what you currently use, but the one above also match files like fooc and foocpp (as there is no dot in the glob).
So instead you should want to use:
[ *.{c,cpp} ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
As an alternative to a file system glob, it is possible to use a “scope selector” which would be source.c and source.c++, for example:
[ 'source.c, source.c++' ] tabSize = 4 theme = 71D40D9D-AE48-11D9-920A-000D93589AF6
The advantage with this is that it will target all C and C++ files, even if they do not have a .c or .cpp extension.
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
On 26 Aug 2019, at 12:13, Umberto Cerrato wrote:
This seems to work too...
[ 'source.*{c, c++, python}' ]
It may seem to work, but it shouldn’t, that is, `source.*` will match all `source` documents (as opposed to `text.*`), the following braces are non-sensical, and the comma will be interpreted as scope selector delimiter.
Either use a file glob or use scope selectors.
For more information about scope selectors I suggest these two resources:
TextMate 1.5.1 manual (but concept is the same for 2.0): https://macromates.com/manual/en/scope_selectors Blog post: https://macromates.com/blog/2005/introduction-to-scopes/
:/ I’m sorry.
Yeah
Best
Il giorno 26 ago 2019, alle ore 12:29, Allan Odgaard mailinglist@textmate.org ha scritto:
On 26 Aug 2019, at 12:13, Umberto Cerrato wrote:
This seems to work too...
[ 'source.*{c, c++, python}' ]
It may seem to work, but it shouldn’t, that is, source.* will match all source documents (as opposed to text.*), the following braces are non-sensical, and the comma will be interpreted as scope selector delimiter.
Either use a file glob or use scope selectors.
For more information about scope selectors I suggest these two resources:
TextMate 1.5.1 manual (but concept is the same for 2.0): https://macromates.com/manual/en/scope_selectors Blog post: https://macromates.com/blog/2005/introduction-to-scopes/
TextMate mailing list TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Hi,
Eventually I made an XML theme that looks like the one in the old online Android developers portal.
https://2bluebuffalo-en.blogspot.com/2019/10/android-devs-xml-theme-for-text...
Il giorno 26 ago 2019, alle ore 13:09, Umberto Cerrato <umbertocerrato@outlook.itmailto:umbertocerrato@outlook.it> ha scritto:
:/ I’m sorry.
Yeah
Best
Il giorno 26 ago 2019, alle ore 12:29, Allan Odgaard <mailinglist@textmate.orgmailto:mailinglist@textmate.org> ha scritto:
On 26 Aug 2019, at 12:13, Umberto Cerrato wrote:
This seems to work too...
[ 'source.*{c, c++, python}' ]
It may seem to work, but it shouldn’t, that is, source.* will match all source documents (as opposed to text.*), the following braces are non-sensical, and the comma will be interpreted as scope selector delimiter.
Either use a file glob or use scope selectors.
For more information about scope selectors I suggest these two resources:
TextMate 1.5.1 manual (but concept is the same for 2.0): https://macromates.com/manual/en/scope_selectors Blog post: https://macromates.com/blog/2005/introduction-to-scopes/
_______________________________________________ TextMate mailing list TextMate@lists.macromates.commailto:TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
ate Umberto,
TextMate does open different files in corresponding modes. I don't think you can change the Theme depending on file type, if only because of the complexity and the requirments for Themes to be available.
I also don't see the necessity, as the modes are very helpful alread and can even be triggered in pipe mode with the -t parameter.
This bash code tells you what modes are currently available:
find ~/Library/Application\ Support/TextMate/Managed/Bundles \ -depth 1 -name '*.tmbundle' -exec bash -c ' tput bold; echo -n "$(defaults read "{}/info.plist" name): "; tput sgr0; echo $(if cd "{}/Syntaxes" 2>/dev/null; then for syntax in *.plist *.tmLanguage; do if [ -f "${syntax}" ]; then /usr/libexec/PlistBuddy -c \ "Print :scopeName" "${syntax}" \ 2>/dev/null \ | grep -v "[{}]"; fi; done; fi)' ; \ | sort -f
el
On 2019-08-23 13:45 , Umberto Cerrato wrote:
Hi,
Is there a function to make TextMate 2 opens a certain file type using a specific theme? e.g. there is the default theme and then you can set TM to open html files using another theme.
Best, u
PS: I need it!! I do not know why only few Text Editors have this feature…
TextMate mailing list TextMate@lists.macromates.com https://lists.macromates.com/listinfo/textmate