Sublime Forum

jQuery Snippets?

#1

I found what appear to be repository ofsnippets for jQuery to use with Sublime Text Editor. But being new to this editor I do not know how to add snippets to the editor. Could someoen provide some assistance in accomplishing this?

0 Likes

#2

simply place the files in your javascript package folder, on my computer (Windows 7) would be:

C:\Users\MYUSERNAME\AppData\Roaming\Sublime Text\Packages\JavaScript

On older windows (pre-vista?) it will be somewhere in C:\Documents and Settings\etc… I believe

0 Likes

#3

that solved the problem. Thanks

0 Likes

#4

[quote=“toothrot”]simply place the files in your javascript package folder, on my computer (Windows 7) would be:

C:\Users\MYUSERNAME\AppData\Roaming\Sublime Text\Packages\JavaScript

On older windows (pre-vista?) it will be somewhere in C:\Documents and Settings\etc… I believe[/quote]

Easier and works in any windows version :smile:
Type this in the RUN dialog (start menu > run OR windows key + R):

%appdata%\Sublime Text\Packages

0 Likes

#5

Hi, Can anyone explain how I can’t activate these snippets? I have them in Javascript folder but tab or ctrl+space does nothing. How I can use them??? I’m using ST2.

0 Likes

#6

I have found that if I delete jQuery from source.js.jquery everything works fine. Am I doing something wrong?

0 Likes

#7

Maybe it’s the location. I have them in User/jQuery and source.js.jquery seems fine. You don’t have to keep them in Javascript folder for them to work under javascript. It’s the scope that makes this happen.

0 Likes

#8

I actually created new folder “myStuffJQuery” and placed them all in there. This folder is located in “Packages” folder. I guess this doesn’t make any difference but anyways, they are working now. Thanks guys.

0 Likes

#9

Could we get these on GitHub?

All the akalias stuff is now gone 404… (and blocked by my work as well… probably because of the word “alias” in the URL)

-Jim

0 Likes

#10

You can use the original jQuery snippets directly, from github.com/textmate/javascript- … r/Snippets

0 Likes

#11

Do these need to be renamed *.sublime-completion or something along those lines first?

-Jim

0 Likes

#12

No, .tmSnippet files are supported as-is

0 Likes

#13

Never mind… just threw them in a folder and started going to town.

0 Likes