Sublime Forum

Push syntax from another package


I have created a package for PEPE Assembly syntax, you can see it here: PEPEasm.

I’m now working on C syntax with this assembly embeded in blocks, for example:

int main() {
    asm {
        MOV R0, 1
    return 0;

I want this new package to push the context of the syntax from the other package.
Before I was doing the development using both syntaxes in the Packages/User folder so something like this worked: (in PEPEC.sublime-syntax)

    - match: 'asm'
      scope: keyword.declaration
      push: Packages/User/PEPEasm.sublime-syntax
        - match: '}'
          pop: true

Now I would like for the PEPEC.sublime-syntax to push a syntax file from another package, basically, my PEPEC package would require PEPEasm. This way users can use either plain Assembly, or Assembly embeded with C, and I would not have to repeat code for the Assembly syntax in both packages.

Is there a way to do this? Thank you very much



You can reuse a context from another file by

- include: Packages/User/PEPEC.sublime-syntax#asm-block

push, set, embed follow the same grammar as well.

- include: PEPEC.sublime-syntax#asm-block

may work too. I don’t test it.



My problem is that PEPEasm, aka the syntax I want to push inside PEPEC, is not in Packages/User, it’s an installed Package



I’ve found the solution.

Turns out the name of the repo of your package is what should go into the


Even if you have a name: key in your syntax!