-
|
Thank you for the amazing ST4 package. It is super useful. I encountered issues with the default definition for Objective-C files: {
"syntax": "Objective-C/Objective-C",
"match": "all",
"rules": [
{"globmatch": "**/*.m"},
{"contains": "^\\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\\b|#import\\s+.+\\.h[\">])"}
]
},where I had to change the rule {"contains": "\\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\\b|#import\\s+.+\\.h[\">])"}There, I removed |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
You'll have to provide me with a minimal example of what you are trying to match before I can look into this further. The pattern is great, but there is not enough context. Off the top of my head, it might be that you need to enable the multiline regex flag. I don't recall if that is enabled by default or not. It might not be. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the super quick reply. Just to avoid confusion or extra work for you, the JSON configuration I copied above was the default setting that you provided with your ST package. I copied it here for ease of reference. In my ST4, when I open any Objective C Your ApplySyntax package works perfectly if I copy your default configuration and remove the caret char I also have MATLAB syntax highlighting in my ST4 editor. Unfortunately, all three languages share the same extension Do you think it is sufficient for you to reproduce the issue? |
Beta Was this translation helpful? Give feedback.
-
|
Please provide conflicting package links you use, such as the Wolfram Mathematica package. I'll try and reproduce when I get a chance. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! I made it work with the default rule including Instead of thiss: {
"translate_tabs_to_spaces": true,
"tab_size": 4,
"extensions":
[
"m",
],
}I had for some strange reasons I am sorry if I bothered you with this issue. It was suspicious to me that it was only working without |
Beta Was this translation helpful? Give feedback.
Thanks! I made it work with the default rule including
^. I don't know why the caret was so special. However, I found a mistake in the way myObjective-C.sublime-settingswas configured:Instead of thiss:
{ "translate_tabs_to_spaces": true, "tab_size": 4, "extensions": [ "m", ], }I had for some strange reasons
extensionsset to an empty array. Now by, addingm, your ST package works like a charm.I am sorry if I bothered you with this issue. It was suspicious to me that it was only working without
^in the regex. If you think everything is ok, let's close the issue.