Sublime Forum

Creating A New Syntax Definition - Stock

#1

Hi

I want to create a new Syntax Definition. I have been following the guide lines from:
docs.sublimetext.info/en/latest/ … xdefs.html

But when I a trying to convert from json to .tmLanguage I get stock

The guide says:
*
Select Json to tmLanguage in Tools | Build System* - Check
Press F7 - Nothing happens
A .tmLanguage file will be generated for you in the same folder as your .JSON-tmLanguage file - Saved it on the desktop but no new file is generated

Anyone know how to move on from here?

0 Likes

#2

[quote=“kjemmo”]Hi

I want to create a new Syntax Definition. I have been following the guide lines from:
docs.sublimetext.info/en/latest/ … xdefs.html

But when I a trying to convert from json to .tmLanguage I get stock

The guide says:
*
Select Json to tmLanguage in Tools | Build System* - Check
Press F7 - Nothing happens
A .tmLanguage file will be generated for you in the same folder as your .JSON-tmLanguage file - Saved it on the desktop but no new file is generated

Anyone know how to move on from here?[/quote]

I stopped using AAAPackageDev myself, I never used most of its features, or they didn’t always work how I wanted them to. People have always been requesting the ability to go from tmLanguage to JSON or from JSON to tmLanguage. A couple of days a ago someone asked the same question about converting color schemes.

I created a simple pluign that allows you to toggle between any PLIST to JSON and vice versa. It is here github.com/facelessuser/PlistJsonConverter.

You can just use the Plist Json Converter: JSON to PLIST command from the command palette. It will convert you to a plist, and then you can save the filename as whatever you want. Hopefully that helps.

If you want specific help in getting the AAAPackageDev feature to work, maybe someone who uses will come along with some help.

0 Likes

#3

AAAPackageDev is a bit neglected, but I believe I added the ability to convert between JSON <> tmLanguage a while ago.

As for the build system not working, make sure the JSON file has a .JSON-tmLanguage extension. Otherwise, please open an issue at the GitHub repo so I remember to take a look at it.

0 Likes

#4

[quote=“guillermooo”]AAAPackageDev is a bit neglected, but I believe I added the ability to convert between JSON <> tmLanguage a while ago.

As for the build system not working, make sure the JSON file has a .JSON-tmLanguage extension. Otherwise, please open an issue at the GitHub repo so I remember to take a look at it.[/quote]

Yes, you do have the support in there, I have never used it though, so I can’t offer much help with that. I stopped using AAAPackageDev in general, not because I thought it wasn’t a good plugin, I just liked to work different than it does. But yes, that is a good suggestion, create an issue for AAAPackageDev on github.

0 Likes

#5

No worries, I just link to it from the docs cause I think editing the XML is inconvenient. Who can resist making their own plugins, anyway? Haha

0 Likes

#6

Thanks for the feedback.

I did use the file extension .json-tmlanguage. Will look into Plist Json Converter.

0 Likes