Skip to content
This repository
Browse code

New snippets

  • Loading branch information...
commit cdea5a5ee3c8593d31b19396a46b6a4eef508da9 1 parent 8f0740e
Amir Salihefendic authored
116  sources_non_forked/vim-snippets/snippets/coffee/angular_coffee.snippets
... ...
@@ -0,0 +1,116 @@
  1
+## Global Snippets
  2
+# Define a new Angular Controller;
  3
+# You can change the controller name and parameters
  4
+snippet ngc
  5
+	${1:controllerName} = (${2:scope}, ${3:injectables}) ->
  6
+		${4}
  7
+# angular.foreach loop
  8
+snippet ngfor
  9
+	angular.forEach ${1:iterateOver}, (value, key) ->
  10
+		${2}
  11
+## Module Based Snippets
  12
+# A new angular module without a config function
  13
+snippet ngm
  14
+	angular.module '${1:moduleName}', [${2:moduleDependencies}]
  15
+	${3}
  16
+# A new angular module without a config function and a variable assignment
  17
+snippet ngma
  18
+	${1:moduleName} = angular.module '$1', [${2:moduleDeps}]
  19
+	${3}
  20
+# A new angular module with a config function
  21
+snippet ngmc
  22
+	${1:moduleName} = angular.module('$1', [${2:moduleDeps}], (${3:configDeps}) ->
  23
+		${4}
  24
+	)
  25
+# A factory in a module
  26
+snippet ngmfa
  27
+	factory '${1:factoryName}', (${2:dependencies}) ->
  28
+		${3}
  29
+# Define an Angular Module Service to be attached to a previously defined module
  30
+# You can change the service name and service injectables
  31
+snippet ngms
  32
+	service '${1:serviceName}', (${2:injectables}) ->
  33
+		${3}
  34
+# Define an Angular Module Filter to be attached to a previously defined module
  35
+# You can change the filter name
  36
+snippet ngmfi
  37
+	filter '${1:filterName}', (${2:injectables}) ->
  38
+		(input, ${3:args}) ->
  39
+			${4}
  40
+## Route Based Snippets
  41
+# Defines a when condition of an AngularJS route
  42
+snippet ngrw
  43
+	$routeProvider.when '${1:url}',
  44
+		templateUrl: '${2:templateUrl}'
  45
+		controller: '${3:controller}'
  46
+	${4}
  47
+# Defines a when condition of an AngularJS route with the resolve block
  48
+snippet ngrwr
  49
+	$routeProvider.when '${1:url}',
  50
+		templateUrl: '${2:templateUrl}'
  51
+		controller: '${3:controller}'
  52
+		resolve:
  53
+			${4}
  54
+	${5}
  55
+# Defines an otherwise condition of an AngularJS route
  56
+snippet ngro
  57
+	$routeProvider.otherwise redirectTo: '${1:url}'
  58
+	${2}
  59
+## Scope Related Snippets
  60
+# Define a new $scope'd function (usually inside an AngularJS Controller)
  61
+# You can change the function name and arguments
  62
+snippet $f
  63
+	$scope.${1:functionName} = (${2:args}) ->
  64
+		${3}
  65
+# Defines a new $scope'd variable inside an AngularJS controller
  66
+snippet $v
  67
+	$scope.${1:variable} = ${2:value}
  68
+	${3}
  69
+# Defines a new $scope'd variable inside an AngularJS controller and assigns a value from a constructor arguments
  70
+snippet $va
  71
+	$scope.${1:variable} = ${2:variable}
  72
+	${3}
  73
+# Define a $watch for an expression
  74
+# You can change the expression to be watched
  75
+snippet $w
  76
+	$scope.$watch '${1:watchExpr}', (newValue, oldValue) ->
  77
+		${2}
  78
+# Define a $on for a $broadcast/$emit on the $scope inside an Angular Controller
  79
+# You can change the event name to listen on
  80
+snippet $on
  81
+	$scope.$on '${1:eventName}', (event, ${2:args}) ->
  82
+		${3}
  83
+# Define a $broadcast for a $scope inside an Angular Controller / Angular Controller Function
  84
+# You can change the event name and optional event arguments
  85
+snippet $b
  86
+	$scope.$broadcast '${1:eventName}', ${2:eventArgs}
  87
+	${3}
  88
+# Define an $emit for a $scope inside an Angular Controller / Angular Controller Function
  89
+# You can change the event name and optional event arguments
  90
+snippet $e
  91
+	$scope.$emit '${1:eventName}', ${2:eventArgs}
  92
+	${3}
  93
+## Directive related snippets
  94
+# A compile function
  95
+snippet ngdcf
  96
+	compile = (tElement, tAttrs, transclude) ->
  97
+		(scope, element, attrs) ->
  98
+			${1}
  99
+# A linking function in a directive
  100
+snippet ngdlf
  101
+	(scope, element, attrs${1:ctrl}) ->
  102
+		${2}
  103
+# A directive with a compile function
  104
+snippet ngdc
  105
+	directive '${1:directiveName}', factory = (${2:injectables}) ->
  106
+		directiveDefinitionObject =
  107
+			${3:directiveAttrs}
  108
+			compile: compile = (tElement, tAttrs, transclude) ->
  109
+				(scope, element, attrs) ->
  110
+		directiveDefinitionObject
  111
+# A directive with a linking function only
  112
+snippet ngdl
  113
+	.directive('${1:directiveName}', (${2:directiveDeps}) ->
  114
+		(scope, element, attrs${3:ctrl}) ->
  115
+			${4}
  116
+	)
101  sources_non_forked/vim-snippets/snippets/coffee/coffee.snippets
... ...
@@ -0,0 +1,101 @@
  1
+# Closure loop
  2
+snippet forindo
  3
+	for ${1:name} in ${2:array}
  4
+		do ($1) ->
  5
+			${0:// body}
  6
+# Array comprehension
  7
+snippet fora
  8
+	for ${1:name} in ${2:array}
  9
+		${0:# body...}
  10
+# Object comprehension
  11
+snippet foro
  12
+	for ${1:key}, ${2:value} of ${3:object}
  13
+		${0:# body...}
  14
+# Range comprehension (inclusive)
  15
+snippet forr
  16
+	for ${1:name} in [${2:start}..${3:finish}]
  17
+		${0:# body...}
  18
+snippet forrb
  19
+	for ${1:name} in [${2:start}..${3:finish}] by ${4:step}
  20
+		${0:# body...}
  21
+# Range comprehension (exclusive)
  22
+snippet forrex
  23
+	for ${1:name} in [${2:start}...${3:finish}]
  24
+		${0:# body...}
  25
+snippet forrexb
  26
+	for ${1:name} in [${2:start}...${3:finish}] by ${4:step}
  27
+		${0:# body...}
  28
+# Function
  29
+snippet fun
  30
+	(${1:args}) ->
  31
+		${0:# body...}
  32
+# Function (bound)
  33
+snippet bfun
  34
+	(${1:args}) =>
  35
+		${0:# body...}
  36
+# Class
  37
+snippet cla class ..
  38
+	class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
  39
+		${0}
  40
+snippet cla class .. constructor: ..
  41
+	class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
  42
+		constructor: (${2:args}) ->
  43
+			${3}
  44
+
  45
+		${0}
  46
+snippet cla class .. extends ..
  47
+	class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass}
  48
+		${0}
  49
+snippet cla class .. extends .. constructor: ..
  50
+	class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass}
  51
+		constructor: (${3:args}) ->
  52
+			${4}
  53
+
  54
+		${0}
  55
+# If
  56
+snippet if
  57
+	if ${1:condition}
  58
+		${0:# body...}
  59
+# If __ Else
  60
+snippet ife
  61
+	if ${1:condition}
  62
+		${2:# body...}
  63
+	else
  64
+		${0:# body...}
  65
+# Else if
  66
+snippet eif
  67
+	else if ${1:condition}
  68
+		${0:# body...}
  69
+# Ternary If
  70
+snippet ifte
  71
+	if ${1:condition} then ${2:value} else ${0:other}
  72
+# Unless
  73
+snippet unl
  74
+	${1:action} unless ${0:condition}
  75
+# Switch
  76
+snippet swi
  77
+	switch ${1:object}
  78
+		when ${2:value}
  79
+			${0:# body...}
  80
+
  81
+# Log
  82
+snippet log
  83
+	console.log ${0}
  84
+# Try __ Catch
  85
+snippet try
  86
+	try
  87
+		${1}
  88
+	catch ${2:error}
  89
+		${0}
  90
+# Require
  91
+snippet req
  92
+	${2:$1} = require '${1:sys}'
  93
+# Export
  94
+snippet exp
  95
+	${0:root} = exports ? this
  96
+
  97
+snippet jsonp
  98
+	JSON.parse ${0:jstr}
  99
+# JSON.stringify
  100
+snippet jsons
  101
+	JSON.stringify ${0:object}
524  sources_non_forked/vim-snippets/snippets/coffee/jquery_coffee.snippets
... ...
@@ -0,0 +1,524 @@
  1
+snippet add
  2
+	${1:obj}.add('${2:selector expression}')
  3
+snippet addClass
  4
+	${1:obj}.addClass('${2:class name}')
  5
+snippet after
  6
+	${1:obj}.after('${2:Some text <b>and bold!</b>}')
  7
+snippet ajax
  8
+	$.ajax
  9
+	  url: "${1:mydomain.com/url}"
  10
+	  type: "${2:POST}"
  11
+	  dataType: "${3:xml/html/script/json}"
  12
+	  data: ${4:data}
  13
+	  complete: (jqXHR, textStatus) ->
  14
+		${5:// callback}
  15
+	  success: (data, textStatus, jqXHR) ->
  16
+		${6:// success callback}
  17
+	  error: (jqXHR, textStatus, errorThrown) ->
  18
+		${0:// error callback}
  19
+snippet ajaxcomplete
  20
+	${1:obj}.ajaxComplete (${1:e}, xhr, settings) ->
  21
+		${0:// callback}
  22
+snippet ajaxerror
  23
+	${1:obj}.ajaxError (${1:e}, xhr, settings, thrownError) ->
  24
+		${2:// error callback}
  25
+	${0}
  26
+snippet ajaxget
  27
+	$.get '${1:mydomain.com/url}',
  28
+		${2:{ param1: value1 },}
  29
+		(data, textStatus, jqXHR) ->
  30
+			${0:// success callback}
  31
+snippet ajaxpost
  32
+	$.post '${1:mydomain.com/url}',
  33
+		${2:{ param1: value1 },}
  34
+		(data, textStatus, jqXHR) ->
  35
+			${0:// success callback}
  36
+snippet ajaxprefilter
  37
+	$.ajaxPrefilter (${1:options}, ${2:originalOptions}, jqXHR) ->
  38
+		${0: // Modify options, control originalOptions, store jqXHR, etc}
  39
+snippet ajaxsend
  40
+	${1:obj}.ajaxSend (${1:request, settings}) ->
  41
+		${2:// error callback}
  42
+	${0}
  43
+snippet ajaxsetup
  44
+	$.ajaxSetup({
  45
+		url: "${1:mydomain.com/url}",
  46
+		type: "${2:POST}",
  47
+		dataType: "${3:xml/html/script/json}",
  48
+		data: $.param( $("${4:Element or Expression}") ),
  49
+		complete: (jqXHR, textStatus) ->
  50
+			${5:// callback}
  51
+		,
  52
+		success: (data, textStatus, jqXHR) ->
  53
+			${6:// success callback}
  54
+		,
  55
+		error: (jqXHR, textStatus, errorThrown) ->
  56
+			${0:// error callback}
  57
+	})
  58
+snippet ajaxstart
  59
+	$.ajaxStart ->
  60
+		${1:// handler for when an AJAX call is started and no other AJAX calls are in progress}
  61
+	${0}
  62
+snippet ajaxstop
  63
+	$.ajaxStop ->
  64
+		${1:// handler for when all AJAX calls have been completed}
  65
+	${0}
  66
+snippet ajaxsuccess
  67
+	$.ajaxSuccess (${1:e}, xhr, settings) ->
  68
+		${2:// handler for when any AJAX call is successfully completed}
  69
+	${0}
  70
+snippet andself
  71
+	${1:obj}.andSelf()
  72
+snippet animate
  73
+	${1:obj}.animate({${2:param1: value1, param2: value2}}, ${3:speed})
  74
+snippet append
  75
+	${1:obj}.append('${2:Some text <b>and bold!</b>}')
  76
+snippet appendTo
  77
+	${1:obj}.appendTo('${2:selector expression}')
  78
+snippet attr
  79
+	${1:obj}.attr('${2:attribute}', '${3:value}')
  80
+snippet attrm
  81
+	${1:obj}.attr({'${2:attr1}': '${3:value1}', '${4:attr2}': '${5:value2}'})
  82
+snippet before
  83
+	${1:obj}.before('${2:Some text <b>and bold!</b>}')
  84
+snippet bind
  85
+	${1:obj}.bind('${2:event name}', (${3:e}) ->
  86
+		${0:// event handler}
  87
+snippet blur
  88
+	${1:obj}.blur (${2:e}) ->
  89
+		${0:// event handler}
  90
+snippet C
  91
+	$.Callbacks()
  92
+snippet Cadd
  93
+	${1:callbacks}.add(${2:callbacks})
  94
+snippet Cdis
  95
+	${1:callbacks}.disable()
  96
+snippet Cempty
  97
+	${1:callbacks}.empty()
  98
+snippet Cfire
  99
+	${1:callbacks}.fire(${2:args})
  100
+snippet Cfired
  101
+	${1:callbacks}.fired()
  102
+snippet Cfirew
  103
+	${1:callbacks}.fireWith(${2:this}, ${3:args})
  104
+snippet Chas
  105
+	${1:callbacks}.has(${2:callback})
  106
+snippet Clock
  107
+	${1:callbacks}.lock()
  108
+snippet Clocked
  109
+	${1:callbacks}.locked()
  110
+snippet Crem
  111
+	${1:callbacks}.remove(${2:callbacks})
  112
+snippet change
  113
+	${1:obj}.change (${2:e}) ->
  114
+		${0:// event handler}
  115
+snippet children
  116
+	${1:obj}.children('${2:selector expression}')
  117
+snippet clearq
  118
+	${1:obj}.clearQueue(${2:'queue name'})
  119
+snippet click
  120
+	${1:obj}.click (${2:e}) ->
  121
+		${0:// event handler}
  122
+snippet clone
  123
+	${1:obj}.clone()
  124
+snippet contains
  125
+	$.contains(${1:container}, ${0:contents})
  126
+snippet css
  127
+	${1:obj}.css('${2:attribute}', '${3:value}')
  128
+snippet csshooks
  129
+	$.cssHooks['${1:CSS prop}'] = {
  130
+		get: (elem, computed, extra) ->
  131
+			${2: // handle getting the CSS property}
  132
+		set: (elem, value) ->
  133
+			${0: // handle setting the CSS value}
  134
+	}
  135
+snippet cssm
  136
+	${1:obj}.css({${2:attribute1}: '${3:value1}', ${4:attribute2}: '${5:value2}'})
  137
+snippet D
  138
+	$.Deferred()
  139
+snippet Dalways
  140
+	${1:deferred}.always(${2:callbacks})
  141
+snippet Ddone
  142
+	${1:deferred}.done(${2:callbacks})
  143
+snippet Dfail
  144
+	${1:deferred}.fail(${2:callbacks})
  145
+snippet Disrej
  146
+	${1:deferred}.isRejected()
  147
+snippet Disres
  148
+	${1:deferred}.isResolved()
  149
+snippet Dnotify
  150
+	${1:deferred}.notify(${2:args})
  151
+snippet Dnotifyw
  152
+	${1:deferred}.notifyWith(${2:this}, ${3:args})
  153
+snippet Dpipe
  154
+	${1:deferred}.then(${2:doneFilter}, ${3:failFilter}, ${4:progressFilter})
  155
+snippet Dprog
  156
+	${1:deferred}.progress(${2:callbacks})
  157
+snippet Dprom
  158
+	${1:deferred}.promise(${2:target})
  159
+snippet Drej
  160
+	${1:deferred}.reject(${2:args})
  161
+snippet Drejw
  162
+	${1:deferred}.rejectWith(${2:this}, ${3:args})
  163
+snippet Dres
  164
+	${1:deferred}.resolve(${2:args})
  165
+snippet Dresw
  166
+	${1:deferred}.resolveWith(${2:this}, ${3:args})
  167
+snippet Dstate
  168
+	${1:deferred}.state()
  169
+snippet Dthen
  170
+	${1:deferred}.then(${2:doneCallbacks}, ${3:failCallbacks}, ${4:progressCallbacks})
  171
+snippet Dwhen
  172
+	$.when(${1:deferreds})
  173
+snippet data
  174
+	${1:obj}.data(${2:obj})
  175
+snippet dataa
  176
+	$.data('${1:selector expression}', '${2:key}'${3:, 'value'})
  177
+snippet dblclick
  178
+	${1:obj}.dblclick (${2:e}) ->
  179
+		${0:// event handler}
  180
+snippet delay
  181
+	${1:obj}.delay('${2:slow/400/fast}'${3:, 'queue name'})
  182
+snippet dele
  183
+	${1:obj}.delegate '${2:selector expression}', '${3:event name}', (${4:e}) ->
  184
+		${0:// event handler}
  185
+snippet deq
  186
+	${1:obj}.dequeue(${2:'queue name'})
  187
+snippet deqq
  188
+	$.dequeue('${1:selector expression}'${2:, 'queue name'})
  189
+snippet detach
  190
+	${1:obj}.detach('${2:selector expression}')
  191
+snippet die
  192
+	${1:obj}.die(${2:event}, ${3:handler})
  193
+snippet each
  194
+	${1:obj}.each (index) ->
  195
+		${0:this.innerHTML = this + " is the element, " + index + " is the position"}
  196
+snippet el
  197
+	$('<${1}/>'${2:, {}})
  198
+snippet eltrim
  199
+	$.trim('${1:string}')
  200
+snippet empty
  201
+	${1:obj}.empty()
  202
+snippet end
  203
+	${1:obj}.end()
  204
+snippet eq
  205
+	${1:obj}.eq(${2:element index})
  206
+snippet error
  207
+	${1:obj}.error (${2:e}) ->
  208
+		${0:// event handler}
  209
+snippet eventsmap
  210
+	{
  211
+		:f${0}
  212
+	}
  213
+snippet extend
  214
+	$.extend(${1:true, }${2:target}, ${3:obj})
  215
+snippet fadein
  216
+	${1:obj}.fadeIn('${2:slow/400/fast}')
  217
+snippet fadeinc
  218
+	${1:obj}.fadeIn 'slow/400/fast', ->
  219
+		${0:// callback}
  220
+snippet fadeout
  221
+	${1:obj}.fadeOut('${2:slow/400/fast}')
  222
+snippet fadeoutc
  223
+	${1:obj}.fadeOut 'slow/400/fast', ->
  224
+		${0:// callback}
  225
+snippet fadeto
  226
+	${1:obj}.fadeTo('${2:slow/400/fast}', ${3:0.5})
  227
+snippet fadetoc
  228
+	${1:obj}.fadeTo 'slow/400/fast', ${2:0.5}, ->
  229
+		${0:// callback}
  230
+snippet filter
  231
+	${1:obj}.filter('${2:selector expression}')
  232
+snippet filtert
  233
+	${1:obj}.filter (${2:index}) ->
  234
+		${3}
  235
+snippet find
  236
+	${1:obj}.find('${2:selector expression}')
  237
+snippet focus
  238
+	${1:obj}.focus (${2:e}) ->
  239
+		${0:// event handler}
  240
+snippet focusin
  241
+	${1:obj}.focusIn (${2:e}) ->
  242
+		${0:// event handler}
  243
+snippet focusout
  244
+	${1:obj}.focusOut (${2:e}) ->
  245
+		${0:// event handler}
  246
+snippet get
  247
+	${1:obj}.get(${2:element index})
  248
+snippet getjson
  249
+	$.getJSON '${1:mydomain.com/url}',
  250
+		${2:{ param1: value1 },}
  251
+		(data, textStatus, jqXHR) ->
  252
+			${0:// success callback}
  253
+snippet getscript
  254
+	$.getScript '${1:mydomain.com/url}', (script, textStatus, jqXHR) ->
  255
+		${0:// callback}
  256
+snippet grep
  257
+	$.grep(${1:array}, (item, index) >
  258
+		${2}
  259
+	${0:, true})
  260
+snippet hasc
  261
+	${1:obj}.hasClass('${2:className}')
  262
+snippet hasd
  263
+	$.hasData('${0:selector expression}')
  264
+snippet height
  265
+	${1:obj}.height(${2:integer})
  266
+snippet hide
  267
+	${1:obj}.hide('${2:slow/400/fast}')
  268
+snippet hidec
  269
+	${1:obj}.hide '${2:slow/400/fast}', ->
  270
+		${0:// callback}
  271
+snippet hover
  272
+	${1:obj}.hover (${2:e}) ->
  273
+		${3:// event handler}
  274
+	, ($2) ->
  275
+		${4:// event handler}
  276
+snippet html
  277
+	${1:obj}.html('${2:Some text <b>and bold!</b>}')
  278
+snippet inarr
  279
+	$.inArray(${1:value}, ${0:array})
  280
+snippet insa
  281
+	${1:obj}.insertAfter('${2:selector expression}')
  282
+snippet insb
  283
+	${1:obj}.insertBefore('${2:selector expression}')
  284
+snippet is
  285
+	${1:obj}.is('${2:selector expression}')
  286
+snippet isarr
  287
+	$.isArray(${1:obj})
  288
+snippet isempty
  289
+	$.isEmptyObject(${1:obj})
  290
+snippet isfunc
  291
+	$.isFunction(${1:obj})
  292
+snippet isnum
  293
+	$.isNumeric(${1:value})
  294
+snippet isobj
  295
+	$.isPlainObject(${1:obj})
  296
+snippet iswin
  297
+	$.isWindow(${1:obj})
  298
+snippet isxml
  299
+	$.isXMLDoc(${1:node})
  300
+snippet jj
  301
+	$('${1:selector}')
  302
+snippet kdown
  303
+	${1:obj}.keydown (${2:e}) ->
  304
+		${0:// event handler}
  305
+snippet kpress
  306
+	${1:obj}.keypress (${2:e}) ->
  307
+		${0:// event handler}
  308
+snippet kup
  309
+	${1:obj}.keyup (${2:e}) ->
  310
+		${0:// event handler}
  311
+snippet last
  312
+	${1:obj}.last('${1:selector expression}')
  313
+snippet live
  314
+	${1:obj}.live '${2:events}', (${3:e}) ->
  315
+		${0:// event handler}
  316
+snippet load
  317
+	${1:obj}.load (${2:e}) ->
  318
+		${0:// event handler}
  319
+snippet loadf
  320
+	${1:obj}.load('${2:mydomain.com/url}',
  321
+		${2:{ param1: value1 },}
  322
+		(responseText, textStatus, xhr) ->
  323
+			${0:// success callback}
  324
+	})
  325
+snippet makearray
  326
+	$.makeArray(${0:obj})
  327
+snippet map
  328
+	${1:obj}.map (${2:index}, ${3:element}) ->
  329
+		${0:// callback}
  330
+snippet mapp
  331
+	$.map ${1:arrayOrObject}, (${2:value}, ${3:indexOrKey}) ->
  332
+		${0:// callback}
  333
+snippet merge
  334
+	$.merge(${1:target}, ${0:original})
  335
+snippet mdown
  336
+	${1:obj}.mousedown (${2:e}) ->
  337
+		${0:// event handler}
  338
+snippet menter
  339
+	${1:obj}.mouseenter (${2:e}) ->
  340
+		${0:// event handler}
  341
+snippet mleave
  342
+	${1:obj}.mouseleave (${2:e}) ->
  343
+		${0:// event handler}
  344
+snippet mmove
  345
+	${1:obj}.mousemove (${2:e}) ->
  346
+		${0:// event handler}
  347
+snippet mout
  348
+	${1:obj}.mouseout (${2:e}) ->
  349
+		${0:// event handler}
  350
+snippet mover
  351
+	${1:obj}.mouseover (${2:e}) ->
  352
+		${0:// event handler}
  353
+snippet mup
  354
+	${1:obj}.mouseup (${2:e}) ->
  355
+		${0:// event handler}
  356
+snippet next
  357
+	${1:obj}.next('${2:selector expression}')
  358
+snippet nexta
  359
+	${1:obj}.nextAll('${2:selector expression}')
  360
+snippet nextu
  361
+	${1:obj}.nextUntil('${2:selector expression}'${3:, 'filter expression'})
  362
+snippet not
  363
+	${1:obj}.not('${2:selector expression}')
  364
+snippet off
  365
+	${1:obj}.off('${2:events}', '${3:selector expression}'${4:, handler})
  366
+snippet offset
  367
+	${1:obj}.offset()
  368
+snippet offsetp
  369
+	${1:obj}.offsetParent()
  370
+snippet on
  371
+	${1:obj}.on '${2:events}', '${3:selector expression}', (${4:e}) ->
  372
+		${0:// event handler}
  373
+snippet one
  374
+	${1:obj}.one '${2:event name}', (${3:e}) ->
  375
+		${0:// event handler}
  376
+snippet outerh
  377
+	${1:obj}.outerHeight()
  378
+snippet outerw
  379
+	${1:obj}.outerWidth()
  380
+snippet param
  381
+	$.param(${1:obj})
  382
+snippet parent
  383
+	${1:obj}.parent('${2:selector expression}')
  384
+snippet parents
  385
+	${1:obj}.parents('${2:selector expression}')
  386
+snippet parentsu
  387
+	${1:obj}.parentsUntil('${2:selector expression}'${3:, 'filter expression'})
  388
+snippet parsejson
  389
+	$.parseJSON(${1:data})
  390
+snippet parsexml
  391
+	$.parseXML(${1:data})
  392
+snippet pos
  393
+	${1:obj}.position()
  394
+snippet prepend
  395
+	${1:obj}.prepend('${2:Some text <b>and bold!</b>}')
  396
+snippet prependto
  397
+	${1:obj}.prependTo('${2:selector expression}')
  398
+snippet prev
  399
+	${1:obj}.prev('${2:selector expression}')
  400
+snippet preva
  401
+	${1:obj}.prevAll('${2:selector expression}')
  402
+snippet prevu
  403
+	${1:obj}.prevUntil('${2:selector expression}'${3:, 'filter expression'})
  404
+snippet promise
  405
+	${1:obj}.promise(${2:'fx'}, ${3:target})
  406
+snippet prop
  407
+	${1:obj}.prop('${2:property name}')
  408
+snippet proxy
  409
+	$.proxy(${1:function}, ${2:this})
  410
+snippet pushstack
  411
+	${1:obj}.pushStack(${2:elements})
  412
+snippet queue
  413
+	${1:obj}.queue(${2:name}${3:, newQueue})
  414
+snippet queuee
  415
+	$.queue(${1:element}${2:, name}${3:, newQueue})
  416
+snippet ready
  417
+	$(() ->
  418
+		${0}
  419
+	)
  420
+snippet rem
  421
+	${1:obj}.remove()
  422
+snippet rema
  423
+	${1:obj}.removeAttr('${2:attribute name}')
  424
+snippet remc
  425
+	${1:obj}.removeClass('${2:class name}')
  426
+snippet remd
  427
+	${1:obj}.removeData('${2:key name}')
  428
+snippet remdd
  429
+	$.removeData(${1:element}${2:, 'key name}')
  430
+snippet remp
  431
+	${1:obj}.removeProp('${2:property name}')
  432
+snippet repa
  433
+	${1:obj}.replaceAll(${2:target})
  434
+snippet repw
  435
+	${1:obj}.replaceWith(${2:content})
  436
+snippet reset
  437
+	${1:obj}.reset (${2:e}) ->
  438
+		${0:// event handler}
  439
+snippet resize
  440
+	${1:obj}.resize (${2:e}) ->
  441
+		${0:// event handler}
  442
+snippet scroll
  443
+	${1:obj}.scroll (${2:e}) ->
  444
+		${0:// event handler}
  445
+snippet scrolll
  446
+	${1:obj}.scrollLeft(${2:value})
  447
+snippet scrollt
  448
+	${1:obj}.scrollTop(${2:value})
  449
+snippet sdown
  450
+	${1:obj}.slideDown('${2:slow/400/fast}')
  451
+snippet sdownc
  452
+	${1:obj}.slideDown('${2:slow/400/fast}', ->
  453
+		${0:// callback}
  454
+snippet select
  455
+	${1:obj}.select (${2:e}) ->
  456
+		${0:// event handler}
  457
+snippet serialize
  458
+	${1:obj}.serialize()
  459
+snippet serializea
  460
+	${1:obj}.serializeArray()
  461
+snippet show
  462
+	${1:obj}.show('${2:slow/400/fast}')
  463
+snippet showc
  464
+	${1:obj}.show '${2:slow/400/fast}', ->
  465
+		${0:// callback}
  466
+snippet sib
  467
+	${1:obj}.siblings('${2:selector expression}')
  468
+snippet size
  469
+	${1:obj}.size()
  470
+snippet slice
  471
+	${1:obj}.slice(${2:start}${3:, end})
  472
+snippet stoggle
  473
+	${1:obj}.slideToggle('${2:slow/400/fast}')
  474
+snippet stop
  475
+	${1:obj}.stop('${2:queue}', ${3:false}, ${4:false})
  476
+snippet submit
  477
+	${1:obj}.submit (${2:e}) ->
  478
+		${0:// event handler}
  479
+snippet sup
  480
+	${1:obj}.slideUp('${2:slow/400/fast}')
  481
+snippet supc
  482
+	${1:obj}.slideUp '${2:slow/400/fast}', ->
  483
+		${0:// callback}
  484
+snippet text
  485
+	${1:obj}.text(${2:'some text'})
  486
+snippet this
  487
+	$(this)
  488
+snippet toarr
  489
+	${0:obj}.toArray()
  490
+snippet tog
  491
+	${1:obj}.toggle  (${2:e}) ->
  492
+		${3:// event handler}
  493
+	, ($2) ->
  494
+		${4:// event handler}
  495
+	${0}
  496
+snippet togclass
  497
+	${1:obj}.toggleClass('${2:class name}')
  498
+snippet togsh
  499
+	${1:obj}.toggle('${2:slow/400/fast}')
  500
+snippet trig
  501
+	${1:obj}.trigger('${2:event name}')
  502
+snippet trigh
  503
+	${1:obj}.triggerHandler('${2:event name}')
  504
+snippet $trim
  505
+	$.trim(${1:str})
  506
+snippet $type
  507
+	$.type(${1:obj})
  508
+snippet unbind
  509
+	${1:obj}.unbind('${2:event name}')
  510
+snippet undele
  511
+	${1:obj}.undelegate(${2:selector expression}, ${3:event}, ${4:handler})
  512
+snippet uniq
  513
+	$.unique(${1:array})
  514
+snippet unload
  515
+	${1:obj}.unload (${2:e}) ->
  516
+		${0:// event handler}
  517
+snippet unwrap
  518
+	${1:obj}.unwrap()
  519
+snippet val
  520
+	${1:obj}.val('${2:text}')
  521
+snippet width
  522
+	${1:obj}.width(${2:integer})
  523
+snippet wrap
  524
+	${1:obj}.wrap('${2:&ltdiv class="extra-wrapper"&gt&lt/div&gt}')
589  sources_non_forked/vim-snippets/snippets/javascript/javascript-jquery.snippets
... ...
@@ -0,0 +1,589 @@
  1
+snippet add
  2
+	${1:obj}.add('${2:selector expression}')
  3
+snippet addClass
  4
+	${1:obj}.addClass('${2:class name}')
  5
+snippet after
  6
+	${1:obj}.after('${2:Some text <b>and bold!</b>}')
  7
+snippet ajax
  8
+	$.ajax({
  9
+		url: '${1:mydomain.com/url}',
  10
+		type: '${2:POST}',
  11
+		dataType: '${3:xml/html/script/json}',
  12
+		data: $.param( $('${4:Element or Expression}') ),
  13
+		complete: function (jqXHR, textStatus) {
  14
+			${5:// callback}
  15
+		},
  16
+		success: function (data, textStatus, jqXHR) {
  17
+			${6:// success callback}
  18
+		},
  19
+		error: function (jqXHR, textStatus, errorThrown) {
  20
+			${0:// error callback}
  21
+		}
  22
+	});
  23
+snippet ajaxcomplete
  24
+	${1:obj}.ajaxComplete(function (${1:e}, xhr, settings) {
  25
+		${0:// callback}
  26
+	});
  27
+snippet ajaxerror
  28
+	${1:obj}.ajaxError(function (${1:e}, xhr, settings, thrownError) {
  29
+		${2:// error callback}
  30
+	});
  31
+	${0}
  32
+snippet ajaxget
  33
+	$.get('${1:mydomain.com/url}',
  34
+		${2:{ param1: value1 },}
  35
+		function (data, textStatus, jqXHR) {
  36
+			${0:// success callback}
  37
+		}
  38
+	);
  39
+snippet ajaxpost
  40
+	$.post('${1:mydomain.com/url}',
  41
+		${2:{ param1: value1 },}
  42
+		function (data, textStatus, jqXHR) {
  43
+			${0:// success callback}
  44
+		}
  45
+	);
  46
+snippet ajaxprefilter
  47
+	$.ajaxPrefilter(function (${1:options}, ${2:originalOptions}, jqXHR) {
  48
+		${0: // Modify options, control originalOptions, store jqXHR, etc}
  49
+	});
  50
+snippet ajaxsend
  51
+	${1:obj}.ajaxSend(function (${1:request, settings}) {
  52
+		${2:// error callback}
  53
+	});
  54
+	${0}
  55
+snippet ajaxsetup
  56
+	$.ajaxSetup({
  57
+		url: "${1:mydomain.com/url}",
  58
+		type: "${2:POST}",
  59
+		dataType: "${3:xml/html/script/json}",
  60
+		data: $.param( $("${4:Element or Expression}") ),
  61
+		complete: function (jqXHR, textStatus) {
  62
+			${5:// callback}
  63
+		},
  64
+		success: function (data, textStatus, jqXHR) {
  65
+			${6:// success callback}
  66
+		},
  67
+		error: function (jqXHR, textStatus, errorThrown) {
  68
+			${0:// error callback}
  69
+		}
  70
+	});
  71
+snippet ajaxstart
  72
+	$.ajaxStart(function () {
  73
+		${1:// handler for when an AJAX call is started and no other AJAX calls are in progress};
  74
+	});
  75
+	${0}
  76
+snippet ajaxstop
  77
+	$.ajaxStop(function () {
  78
+		${1:// handler for when all AJAX calls have been completed};
  79
+	});
  80
+	${0}
  81
+snippet ajaxsuccess
  82
+	$.ajaxSuccess(function (${1:e}, xhr, settings) {
  83
+		${2:// handler for when any AJAX call is successfully completed};
  84
+	});
  85
+	${0}
  86
+snippet andself
  87
+	${1:obj}.andSelf()
  88
+snippet animate
  89
+	${1:obj}.animate({${2:param1: value1, param2: value2}}, ${3:speed})
  90
+snippet append
  91
+	${1:obj}.append('${2:Some text <b>and bold!</b>}')
  92
+snippet appendTo
  93
+	${1:obj}.appendTo('${2:selector expression}')
  94
+snippet attr
  95
+	${1:obj}.attr('${2:attribute}', '${3:value}')
  96
+snippet attrm
  97
+	${1:obj}.attr({'${2:attr1}': '${3:value1}', '${4:attr2}': '${5:value2}'})
  98
+snippet before
  99
+	${1:obj}.before('${2:Some text <b>and bold!</b>}')
  100
+snippet bind
  101
+	${1:obj}.bind('${2:event name}', function (${3:e}) {
  102
+		${0:// event handler}
  103
+	});
  104
+snippet blur
  105
+	${1:obj}.blur(function (${2:e}) {
  106
+		${0:// event handler}
  107
+	});
  108
+snippet C
  109
+	$.Callbacks()
  110
+snippet Cadd
  111
+	${1:callbacks}.add(${2:callbacks})
  112
+snippet Cdis
  113
+	${1:callbacks}.disable()
  114
+snippet Cempty
  115
+	${1:callbacks}.empty()
  116
+snippet Cfire
  117
+	${1:callbacks}.fire(${2:args})
  118
+snippet Cfired
  119
+	${1:callbacks}.fired()
  120
+snippet Cfirew
  121
+	${1:callbacks}.fireWith(${2:this}, ${3:args})
  122
+snippet Chas
  123
+	${1:callbacks}.has(${2:callback})
  124
+snippet Clock
  125
+	${1:callbacks}.lock()
  126
+snippet Clocked
  127
+	${1:callbacks}.locked()
  128
+snippet Crem
  129
+	${1:callbacks}.remove(${2:callbacks})
  130
+snippet change
  131
+	${1:obj}.change(function (${2:e}) {
  132
+		${0:// event handler}
  133
+	});
  134
+snippet children
  135
+	${1:obj}.children('${2:selector expression}')
  136
+snippet clearq
  137
+	${1:obj}.clearQueue(${2:'queue name'})
  138
+snippet click
  139
+	${1:obj}.click(function (${2:e}) {
  140
+		${0:// event handler}
  141
+	});
  142
+snippet clone
  143
+	${1:obj}.clone()
  144
+snippet contains
  145
+	$.contains(${1:container}, ${0:contents});
  146
+snippet css
  147
+	${1:obj}.css('${2:attribute}', '${3:value}')
  148
+snippet csshooks
  149
+	$.cssHooks['${1:CSS prop}'] = {
  150
+		get: function (elem, computed, extra) {
  151
+			${2: // handle getting the CSS property}
  152
+		},
  153
+		set: function (elem, value) {
  154
+			${0: // handle setting the CSS value}
  155
+		}
  156
+	};
  157
+snippet cssm
  158
+	${1:obj}.css({${2:attribute1}: '${3:value1}', ${4:attribute2}: '${5:value2}'})
  159
+snippet D
  160
+	$.Deferred()
  161
+snippet Dalways
  162
+	${1:deferred}.always(${2:callbacks})
  163
+snippet Ddone
  164
+	${1:deferred}.done(${2:callbacks})
  165
+snippet Dfail
  166
+	${1:deferred}.fail(${2:callbacks})
  167
+snippet Disrej
  168
+	${1:deferred}.isRejected()
  169
+snippet Disres
  170
+	${1:deferred}.isResolved()
  171
+snippet Dnotify
  172
+	${1:deferred}.notify(${2:args})
  173
+snippet Dnotifyw
  174
+	${1:deferred}.notifyWith(${2:this}, ${3:args})
  175
+snippet Dpipe
  176
+	${1:deferred}.then(${2:doneFilter}, ${3:failFilter}, ${4:progressFilter})
  177
+snippet Dprog
  178
+	${1:deferred}.progress(${2:callbacks})
  179
+snippet Dprom
  180
+	${1:deferred}.promise(${2:target})
  181
+snippet Drej
  182
+	${1:deferred}.reject(${2:args})
  183
+snippet Drejw
  184
+	${1:deferred}.rejectWith(${2:this}, ${3:args})
  185
+snippet Dres
  186
+	${1:deferred}.resolve(${2:args})
  187
+snippet Dresw
  188
+	${1:deferred}.resolveWith(${2:this}, ${3:args})
  189
+snippet Dstate
  190
+	${1:deferred}.state()
  191
+snippet Dthen
  192
+	${1:deferred}.then(${2:doneCallbacks}, ${3:failCallbacks}, ${4:progressCallbacks})
  193
+snippet Dwhen
  194
+	$.when(${1:deferreds})
  195
+snippet data
  196
+	${1:obj}.data(${2:obj})
  197
+snippet dataa
  198
+	$.data('${1:selector expression}', '${2:key}'${3:, 'value'})
  199
+snippet dblclick
  200
+	${1:obj}.dblclick(function (${2:e}) {
  201
+		${0:// event handler}
  202
+	});
  203
+snippet delay
  204
+	${1:obj}.delay('${2:slow/400/fast}'${3:, 'queue name'})
  205
+snippet dele
  206
+	${1:obj}.delegate('${2:selector expression}', '${3:event name}', function (${4:e}) {
  207
+		${0:// event handler}
  208
+	});
  209
+snippet deq
  210
+	${1:obj}.dequeue(${2:'queue name'})
  211
+snippet deqq
  212
+	$.dequeue('${1:selector expression}'${2:, 'queue name'})
  213
+snippet detach
  214
+	${1:obj}.detach('${2:selector expression}')
  215
+snippet die
  216
+	${1:obj}.die(${2:event}, ${3:handler})
  217
+snippet each
  218
+	${1:obj}.each(function (index) {
  219
+		${0:this.innerHTML = this + " is the element, " + index + " is the position";}
  220
+	});
  221
+snippet el
  222
+	$('<${1}/>'${2:, {}})
  223
+snippet eltrim
  224
+	$.trim('${1:string}')
  225
+snippet empty
  226
+	${1:obj}.empty()
  227
+snippet end
  228
+	${1:obj}.end()
  229
+snippet eq
  230
+	${1:obj}.eq(${2:element index})
  231
+snippet error
  232
+	${1:obj}.error(function (${2:e}) {
  233
+		${0:// event handler}
  234
+	});
  235
+snippet eventsmap
  236
+	{
  237
+		:f${0}
  238
+	}
  239
+snippet extend
  240
+	$.extend(${1:true, }${2:target}, ${3:obj})
  241
+snippet fadein
  242
+	${1:obj}.fadeIn('${2:slow/400/fast}')
  243
+snippet fadeinc
  244
+	${1:obj}.fadeIn('slow/400/fast', function () {
  245
+		${0:// callback};
  246
+	});
  247
+snippet fadeout
  248
+	${1:obj}.fadeOut('${2:slow/400/fast}')
  249
+snippet fadeoutc
  250
+	${1:obj}.fadeOut('slow/400/fast', function () {
  251
+		${0:// callback};
  252
+	});
  253
+snippet fadeto
  254
+	${1:obj}.fadeTo('${2:slow/400/fast}', ${3:0.5})
  255
+snippet fadetoc
  256
+	${1:obj}.fadeTo('slow/400/fast', ${2:0.5}, function () {
  257
+		${0:// callback};
  258
+	});
  259
+snippet filter
  260
+	${1:obj}.filter('${2:selector expression}')
  261
+snippet filtert
  262
+	${1:obj}.filter(function (${2:index}) {
  263
+		${3}
  264
+	})
  265
+snippet find
  266
+	${1:obj}.find('${2:selector expression}')
  267
+snippet focus
  268
+	${1:obj}.focus(function (${2:e}) {
  269
+		${0:// event handler}
  270
+	});
  271
+snippet focusin
  272
+	${1:obj}.focusIn(function (${2:e}) {
  273
+		${0:// event handler}
  274
+	});
  275
+snippet focusout
  276
+	${1:obj}.focusOut(function (${2:e}) {
  277
+		${0:// event handler}
  278
+	});
  279
+snippet get