Reputation: 3
I'm using Sublime Text build 3126 on a Windows machine, and I'm trying to follow the steps in this documentation for creating a very simple syntax definition file. Here is the example given:
%YAML 1.2
---
name: Z
file_extensions: z
scope: source.c
contexts:
main:
- match: \b(if|else|for|while)\b
scope: keyword.control.c
This doesn't work for me in the same way as this post: no option for this custom definition appears under View > Syntax. The original poster seemed to resolve their issue, but I tried to uninstall and reinstall all of ST3 and related files, but I'm still having the same issue.
Upvotes: 0
Views: 498
Reputation: 16065
There are two things to note here:
.sublime-syntax
for ST to treat it as a syntax definition. Using .yaml
won't work.Packages/User/
, and then save another one, both of them will then appear under the User submenu instead of the main syntax list i.e. View -> Syntax -> User -> Z. Note that you can also use the command palette to find a syntax definition by typing Set Syntax:
Upvotes: 1