Sublime Forum

I'm lost on packages

#1

It’s probably a newbie failure to find the right page or terminology, but I’m not quite understanding how to make a package, and, indeed, whether I want to make a package.

I want to add some Lilypond support to this editor. I gather from other posts here that I can grab a tmlanguage file from Textmate, and, assuming the license allows for free use, place it in a package directory, and get Sublime to use it. That will handle syntax highlighting, or serve as a beginning of such.

I also see that plugins can be created, and see there is an API for it.

I see from browsing packages that they’re just directories full of files with the various extensions Sublime uses for plugins, snippets, macros, and languages.

But I’m not quite understanding what makes a package a package–do they all get registered with the editor upon startup, are they activated by doing something in particular, are they anything more than a directory full of these various kinds of things.

I’d appreciate a gentle push in the right direction.

0 Likes

#2

They’re just a directory. Sublime Text itself just works with all files under %APPDATA%\Sublime Text\Packages, irrespective of which directory/package they’re in.

There is a concept of a .sublime-package file, which is just a zipped directory. These can be used to distribute packages: double clicking on one will copy the files to the correct place, and take care of upgrading the package if it was already installed.

0 Likes

#3

The community has developed a lot of packages. The current site that collects and lists most of these is at: sublimetextwiki.com

Also, a new site is underway at sublimetext.info as well that has some additional info as well.

Take a look at what has been developed for your own consumption, or also for reference when creating your own packages. If you come up with something to contribute, let us know. There is currently stuff hosted at both SourceForge and BitBucket. I think there is also a few tings on GitHub.

Greg

0 Likes