I want to define the # as commentary lines for octave, and after it just use the Sublime Text Default Matlab syntax.
I tried this, but does not work, the lines with # still ignored by my definition, and the Matlab syntax are used instead of mime.
%YAML 1.2
β
name: OCTAVE
file_extensions:
- octave
scope: source.octave
contexts:
main:
- match: (#).*$\n?
scope: comment.line.percentage.octave
pop: true
- match: .
push: Packages/Matlab/Matlab.sublime-syntax
The other solution which works but is ugly is to duplicate the Matlab syntax, and add the scope # as commentaries. But this is ugly. And I do not know if I can share my modifications to a Sublime Text Default Package as the Matlab syntax, just changing some lines after renaming everything to octave.