I used this sublime-syntax to get it to highlight like the image below. How would it be possible to highlight between @# and #@ as HTML?
%YAML 1.2
---
# See http://www.sublimetext.com/docs/syntax.html
name: IJS
file_extensions: [ijs]
scope: source.ijs
contexts:
main:
- match: ''
push: Packages/JavaScript/JavaScript.sublime-syntax
with_prototype:
- match: (@#)
push: expr
expr:
- match: (#@)
pop: true
Also I tried using what is below and I didn’t get the error I mentioned earlier anymore but it didn’t seem to highlight the text as JavaScript.
%YAML 1.2
---
# See http://www.sublimetext.com/docs/syntax.html
name: IJS
file_extensions: [ijs]
scope: source.ijs
extends: Packages/JavaScript/JavaScript.sublime-syntax
version: 2
contexts:
main:
- match: ''
scope: 'test.test.test'
I don’t find it possible to learn how to create these from the /docs/syntax.html page alone and there isn’t any other documentation. It would be helpful if there were more examples and possibly visual demonstrations of how each command works, possibly with video tutorials. I was able to stitch together the code at the top of this post that highlights JavaScript from just copy pasting the example code and editing it but I really don’t understand how with_prototype and other commands in it work.
Also if there are any Sublime Text developers reading this would it be possible to use JSON instead of YAML? Because YAML is white space sensitive and also you cannot use tabs, must use spaces that are 2 or 4 which is unnecessary and could make it harder to work with if errors come up when creating things with it. And I was having some issues while using Regex in YAML which I figured out later is because if you don’t put them in quotes it can lead to errors, whereas JSON that could have been avoided. More people already know JSON and it is used in other parts of Sublime Text like the Settings.