Sublime Forum

ST3: how to edit language packages

#1

In ST2 I could browse the defualt packages for each language, open the -tmLanguage file for the language definitions and edit it.
(to add a new file extension to the Listed file types , for example)

in ST3 browse packages sends me to C:\Users<user>\AppData\Roaming\Sublime Text 3\Packages
and I only see and edit teh few packages I have installed
default packages appear to be compiled binaries in* C:\Program Files\Sublime Text 3\Packages*

SO, if I want to add a new file type extension to say my javaScript language definition, how do I do it?

0 Likes

#2

I’d recommend using a plugin like ApplySyntax to set the syntax rather than modifying the file directly. You can also open a file wit the proper extension and use the “Open all with current extension…” menu. That being said, if you want to modify the syntax (or really any packaged plugin directly) and not worry about placing the files correctly, I would recommend using PackageResourceViewer. I wrote it to make browsing/overriding plugin files in ST3 easier.

0 Likes

#3

I installed Applysyntax

the link says

I have no Idea what a syntax rule looks like.
Packages/ApplySyntax/ApplySyntax.sublime-settings does not seem to exist so I cannot look at examples.

where are examples?
what do I type here?

[code] // Put your custom syntax rules here:
“syntaxes”:

][/code]
0 Likes

#4

Take a look at the default settings file.

github.com/facelessuser/ApplySy … e-settings

0 Likes

#5

Where is “Open all with current extension…”?

0 Likes

#6

Bottom bar, on the right where the you have the syntax name.

0 Likes