SublimeText / PackageDev

Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
MIT License
436 stars 83 forks source link

tmLanguage --> YAML conversion issues #76

Closed Meru closed 8 years ago

Meru commented 8 years ago

Hi. Maybe I don't understand something, but I just tried PackageDev for the sake of converting my custom syntax to YAML and noticed that. PackageDev creates something that looks like:

# [PackageDev] target_format: plist, ext: tmLanguage
comment: MyCommentHere
name: NameHere
scopeName: source.ext
fileTypes: [ext]
uuid: uuuuuuuu-iiii-iiii-iiii-dddddddddddd

but this doesn't work in Sublime and doesn't seem to follow the spec: http://www.sublimetext.com/docs/3/syntax.html

# [PackageDev] target_format: plist, ext: tmLanguage
comment: MyCommentHere
name: NameHere
scope: source.ext
file_extensions: [ext]
uuid: uuuuuuuu-iiii-iiii-iiii-dddddddddddd

This works. I haven't tested it beyond header. Am I doing something wrong?

Edit: also it creates files .YAML-tmLanguage. Shouldn't it be .sublime-syntax?

StarlitGhost commented 8 years ago

This project hasn't been updated for Sublime Text 3 yet. There hasn't been any activity for quite a while, so I'm unsure if support is coming or not...

Meru commented 8 years ago

Ouch. I just saw that last commit was 5 days ago and assumed that project is active. That's where my mistake was, probably. I see.

FichteFoll commented 8 years ago

@MeruP, this package predates the .sublime-syntax format and instead solely focusses on a prettier presentation of .tmLanguage files (thus, it uses the .YAML-tmLanguage extension). If you want to generate a .sublime-syntax file from a .tmLanguage, use the built-in command to convert to a .sublime-syntax file instead.

To do that,

  1. Open a new view.
  2. Set the syntax to the one you want to convert.
  3. Hit Tools > Developer > New Syntax from xxx.tmLanguage...

This project hasn't been updated for Sublime Text 3 yet.

This package has supported ST3 since Jan 2014, which is over 2 years ago. (#38)

I just saw that last commit was 5 days ago and assumed that project is active.

It still works just fine in most situations, which is why an update isn't necessary. I do have plans to extend it eventually (see open issues) but not enough time at this moment.