Sublime Forum

Sublime Syntax file for Sublime Syntax files

#1

I got frustrated with the lack of decent syntax highlighting while editing .sublime-syntax files and created a quick-and-dirty package for this.

Currently it can:

  • highlight multiline regular expressions in both variables and matches
  • distinguish between “keywords” like match, scope etc and contexts/variables that you have defined yourself
  • capture contexts/variables as symbols so you can use Go-To-Definition to jump around the syntax file
  • toggle YAML comments with the usual keyboard shortcut

If this already exists, or if it should be incorporated into an existing package, let me know. The current version is sure to have some bugs and the scope names it assigns are not the best, but it does the job. I’m posting here in case this is useful to someone else.

Here is the code:

0 Likes

#2

See also https://github.com/sublimehq/Packages/pull/95.

I want to take a look at the above and refine it a bit since I worked on the YAML syntax def and the YAML-tmLanguage syntax def from PackageDev. The result will be added to PackageDev. Might as well take a look at yours too.

1 Like