Home Download Buy Blog Forum Support

How do you use TextMate tmBundles in Sublime Text?

How do you use TextMate tmBundles in Sublime Text?

Postby jakobud on Thu Feb 02, 2012 6:36 pm

How exactly do you use the Textmate tmBundles in ST?

There are a ton of official bundles here:

For example, I wanted to grab the jQuery bundle from there and use it. So I downloaded the zip file, and unzipped it, giving me the folder:

Code: Select all

First of all, I assume that need to rename the folder to get rid of the -e277e98 github stuff at the end.

Next, where do I put it? In
Code: Select all
? or
Code: Select all
? I was always under the assumptions that all customizations to the packages should always be put in the User directory, but in this case I'm adding a brand new package so I'm not sure where the proper place to put it would be. I don't want the package to get overwritten or deleted when I install a new version of SublimeText down the road. Where is the proper place to put it?

To experiment, I put it here:

Code: Select all

I started up, ST, no errors. So far so good.

I made a new file and choose the Syntax: jQuery (JavaScript). I also noticed that under Syntax, JavaScript has a submenu, where I can choose either JavaScript or JSON. It kind of makes sense that jQuery should be under that JavaScript submenu. How would I put it there?

Anyways, moving on. I decided to look at the snippets. I found the following snippet in the menu: .animate. When I click it, I get

Code: Select all
.animate({param1: value1, param2: value2}, speed)

According to the menu, the tabTrigger is
Code: Select all
So next, I typed
Code: Select all
and pressed TAB. Nothing. I looked at the snippet code, animate.tmSnippet:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
   <string>.animate({${1:param1: value1, param2: value2}}, ${2:speed})$0</string>

It looks like the .animate tabTrigger is correct. So why didn't it work when I typed it and pressed TAB? Is there something wrong with my config?

Another thing I wanted to do, was change the name of the tmbundle folder. I changed it to simply:

Code: Select all

When I restarted ST, I get the error:

Error loading syntax file Packages/textmate-javascript-jquery.tmbundle/Syntaxes/jQuery (JavaScript).tmLanguage.....

Okay.... so am I not allowed to even change a folder name for a bundle? I've changed the name of other bundle folders in my User folder before without issue.

So anyways, it's not clear at all how to use tmBundles properly. I don't know where to put them and as a result I'm having issues using snippets etc... Is there a guide out there or something for this?
Posts: 37
Joined: Wed Feb 17, 2010 6:05 pm

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 21 guests