How exactly do you use the Textmate tmBundles in ST?
There are a ton of official bundles here:
github.com/textmate
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:
textmate-javascript-jquery.tmbundle-e277e98
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 Data/Packages/
? or Data/Packages/User
? 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:
Data/Packages/textmate-javascript-jquery.tmbundle/
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
.animate({param1: value1, param2: value2}, speed)
According to the menu, the tabTrigger is .animate,tab
So next, I typed .animate
and pressed TAB. Nothing. I looked at the snippet code, animate.tmSnippet:
[code]<?xml version="1.0" encoding="UTF-8"?>
content .animate({${1:param1: value1, param2: value2}}, ${2:speed})$0 name animate scope source.js.jquery tabTrigger .animate uuid DDE3146C-FE63-465B-A9C6-4837DDF96475 [/code]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:
jQuery.tmbundle
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?