Sublime Forum

Where are .tmLanguage files stored for ST3

#1

I’ve been looking for a while, but where are the ST3 .tmLanguage files? I can only find .tmLanguage.cache files in Application Data/Cache. I’ve used Everything to search my entire computer for them too.

0 Likes

Where are the default packages in Sublime Text 3
Add new symbols to index
#2

They are in tha application folder (where you installed it to). They might be wrapped into various subfolders but the last directory would be “Packages”.

On my Portable Windows ST3: “c:\Program Files\Sublime Text 3 Portable Beta\Packages”
On someone’s OSX ST3: “/Applications/Sublime Text.app/Contents/MacOS/Packages”

0 Likes

#3

I’ve checked there several times. Sublime Text 3 is installed to C:\Program Files\Sublime Text 3 and the only subfolder in that folder is Packages and all that is in there are binary .sublime-package files for each of the languages. I’ve also checked C:\Documents and Settings\myusername\Application Data\Sublime Text 3 and C:\Documents and Settings\myusername\Local Settings\Application Data\Sublime Text 3 and neither have any .tmLanguage files. Is he using the language files from the ST2 folder if we have it installed? Because I can find those easily.

0 Likes

#4

Is it possible that Sublime 3 uses the files from Sublime 2? Because I get a an error about a self defined language.tm file in Sublime Text 3 - but the file lives in the ST2 folder.

0 Likes

#5

.sublime-package is simple zip archive. rename as .zip and open it with archiver

0 Likes

#6

Okay sweet so I was able to open the .sublime-package archive, but now I’m really confused on how I’m supposed to write my own language files. Do I just need to include the same things as one of these packages in a folder and then somehow package it into a .sublime-package archive? I’m trying to make a language file for Racket/Scheme

0 Likes

#7

On windows you Sublime Packages are stored inside the AppData folder.
In sublime, Find preferences, and browse packages. Takes you right there.

0 Likes

#8

docs.sublimetext.info/en/latest/ … xdefs.html

And you should save these “new” files in a new directory in the AppData ST directory as Foxboron mentioned. Or optionally just use the “User” package for it if you only have a single def you do nat want to share on e.g. github.

0 Likes

#9

Thank you for the link! And what is the difference between the User directory and a new package directory?

0 Likes

#10

The “User” package is practically said to not being touched by anything (except for settings modifications from within plugins). That is, it’s considered to be your “test stuff here” or your “small things/settings/snippets and stuff that does not really belong anywhere else”. Thus, it’s easy to create a subdir in the User package and store a few settings or snippets there. If you intend to create more than just a few files it might be worth creating a new package for them. This is mostly the case for new languages with e.g. snippets.

Well, there are no real “rules” for it but this is how I organize my things. And, if you want to write a plugin/package and upload it to github/Package Control you really want this to be in its own directory.

0 Likes

#11

There is some documentation on packages at sublimetext.com/docs/3/packages.html

0 Likes