Ches Martin avatar Ches Martin committed 25d677a

vim: rename Jasmine snippets so both types aren't loaded always

Previously it was nice and clean that, say, the Jasmine snippets weren't
loaded if you were editing a plain JavaScript file, but unfortunately both
sets of snippets were loaded for all Jasmine files, so you were prompted
which version to use on every expansion :-/

Hopefully UltiSnips will eventually have a better way to deal with the
jasmine.<javascript|coffee> dot syntax for filetypes someday.

Comments (0)

Files changed (4)

.vim/UltiSnips/coffee_jasmine.snippets

-#
-# CoffeeScript versions -- adapted from the JS TextMate bundle + additions
-# for some jasmine-jquery matchers
-#
-extends coffee
-
-snippet des "Describe (coffee)" b
-describe '${1:description}', ->
-	$0
-endsnippet
-
-snippet it "it (coffee)" b
-it '${1:description}', ->
-	$0
-endsnippet
-
-snippet bef "before each (coffee)" b
-beforeEach ->
-	$0
-endsnippet
-
-snippet aft "after each (coffee)" b
-afterEach ->
-	$0
-endsnippet
-
-snippet any "any (coffee)" b
-jasmine.any($1)
-endsnippet
-
-snippet ru "runs (coffee)" b
-runs ->
-	$0
-endsnippet
-
-snippet wa "waits (coffee)" b
-waits($1)
-endsnippet
-
-snippet ex "expect (coffee)" b
-expect(${1:target})$0
-endsnippet
-
-snippet ee "expect to equal (coffee)" b
-expect(${1:target}).toEqual(${2:value})
-endsnippet
-
-snippet em "expect to match (coffee)" b
-expect(${1:target}).toMatch(${2:pattern})
-endsnippet
-
-snippet eha "expect to have attribute (coffee)" b
-expect(${1:target}).toHaveAttr('${2:attr}'${3:, '${4:value}'})
-endsnippet
-
-snippet et "expect to be truthy (coffee)" b
-expect(${1:target}).toBeTruthy()
-endsnippet
-
-snippet ef "expect to be falsy (coffee)" b
-expect(${1:target}).toBeFalsy()
-endsnippet
-
-snippet ed "expect to be defined (coffee)" b
-expect(${1:target}).toBeDefined()
-endsnippet
-
-snippet en "expect to be null (coffee)" b
-expect(${1:target}).toBeNull()
-endsnippet
-
-snippet ec "expect to contain (coffee)" b
-expect(${1:target}).toContain(${2:value})
-endsnippet
-
-snippet ev "expect to be visible (coffee)" b
-expect(${1:target}).toBeVisible()
-endsnippet
-
-snippet eh "expect to be hidden (coffee)" b
-expect(${1:target}).toBeHidden()
-endsnippet
-
-snippet notx "expect not (coffee)" b
-expect(${1:target}).not$0
-endsnippet
-
-snippet note "expect not to equal (coffee)" b
-expect(${1:target}).not.toEqual(${2:value})
-endsnippet
-
-snippet notm "expect not to match (coffee)" b
-expect(${1:target}).not.toMatch(${2:pattern})
-endsnippet
-
-snippet notha "expect to not have attribute (coffee)" b
-expect(${1:target}).not.toHaveAttr('${2:attr}'${3:, '${4:value}'})
-endsnippet
-
-snippet nott "expect not to be truthy (coffee)" b
-expect(${1:target}).not.toBeTruthy()
-endsnippet
-
-snippet notf "expect not to be falsy (coffee)" b
-expect(${1:target}).not.toBeFalsy()
-endsnippet
-
-snippet notd "expect not to be defined (coffee)" b
-expect(${1:target}).not.toBeDefined()
-endsnippet
-
-snippet notn "expect not to be null (coffee)" b
-expect(${1:target}).not.toBeNull()
-endsnippet
-
-snippet notc "expect not to contain (coffee)" b
-expect(${1:target}).not.toContain(${2:value})
-endsnippet
-
-snippet notv "expect not to be visible (coffee)" b
-expect(${1:target}).not.toBeVisible()
-endsnippet
-
-snippet noth "expect not to be hidden (coffee)" b
-expect(${1:target}).not.toBeHidden()
-endsnippet
-
-snippet s "spy on (coffee)" b
-spyOn(${1:object}, "${2:method}")$0
-endsnippet
-
-snippet sr "spy on and return (coffee)" b
-spyOn(${1:object}, "${2:method}").andReturn(${3:arguments})
-endsnippet
-
-snippet st "spy on and throw (coffee)" b
-spyOn(${1:object}, "${2:method}").andThrow(${3:exception})
-endsnippet
-
-snippet sct "spy on and call through (coffee)" b
-spyOn(${1:object}, "${2:method}").andCallThrough()
-endsnippet
-
-snippet scf "spy on and call fake (coffee)" b
-spyOn(${1:object}, "${2:method}").andCallFake(${3:function})
-endsnippet
-
-snippet esc "expect was called (coffee)" b
-expect(${1:target}).wasCalled()
-endsnippet
-
-snippet escw "expect was called with (coffee)" b
-expect(${1:target}).wasCalledWith(${2:arguments})
-endsnippet
-
-snippet notsc "expect was not called (coffee)" b
-expect(${1:target}).wasNotCalled()
-endsnippet
-
-snippet noscw "expect was not called with (coffee)" b
-expect(${1:target}).wasNotCalledWith(${2:arguments})
-endsnippet
-

.vim/UltiSnips/jasmine_coffee.snippets

+#
+# CoffeeScript versions -- adapted from the JS TextMate bundle + additions
+# for some jasmine-jquery matchers
+#
+extends coffee
+
+snippet des "Describe (coffee)" b
+describe '${1:description}', ->
+	$0
+endsnippet
+
+snippet it "it (coffee)" b
+it '${1:description}', ->
+	$0
+endsnippet
+
+snippet bef "before each (coffee)" b
+beforeEach ->
+	$0
+endsnippet
+
+snippet aft "after each (coffee)" b
+afterEach ->
+	$0
+endsnippet
+
+snippet any "any (coffee)" b
+jasmine.any($1)
+endsnippet
+
+snippet ru "runs (coffee)" b
+runs ->
+	$0
+endsnippet
+
+snippet wa "waits (coffee)" b
+waits($1)
+endsnippet
+
+snippet ex "expect (coffee)" b
+expect(${1:target})$0
+endsnippet
+
+snippet ee "expect to equal (coffee)" b
+expect(${1:target}).toEqual(${2:value})
+endsnippet
+
+snippet em "expect to match (coffee)" b
+expect(${1:target}).toMatch(${2:pattern})
+endsnippet
+
+snippet eha "expect to have attribute (coffee)" b
+expect(${1:target}).toHaveAttr('${2:attr}'${3:, '${4:value}'})
+endsnippet
+
+snippet et "expect to be truthy (coffee)" b
+expect(${1:target}).toBeTruthy()
+endsnippet
+
+snippet ef "expect to be falsy (coffee)" b
+expect(${1:target}).toBeFalsy()
+endsnippet
+
+snippet ed "expect to be defined (coffee)" b
+expect(${1:target}).toBeDefined()
+endsnippet
+
+snippet en "expect to be null (coffee)" b
+expect(${1:target}).toBeNull()
+endsnippet
+
+snippet ec "expect to contain (coffee)" b
+expect(${1:target}).toContain(${2:value})
+endsnippet
+
+snippet ev "expect to be visible (coffee)" b
+expect(${1:target}).toBeVisible()
+endsnippet
+
+snippet eh "expect to be hidden (coffee)" b
+expect(${1:target}).toBeHidden()
+endsnippet
+
+snippet notx "expect not (coffee)" b
+expect(${1:target}).not$0
+endsnippet
+
+snippet note "expect not to equal (coffee)" b
+expect(${1:target}).not.toEqual(${2:value})
+endsnippet
+
+snippet notm "expect not to match (coffee)" b
+expect(${1:target}).not.toMatch(${2:pattern})
+endsnippet
+
+snippet notha "expect to not have attribute (coffee)" b
+expect(${1:target}).not.toHaveAttr('${2:attr}'${3:, '${4:value}'})
+endsnippet
+
+snippet nott "expect not to be truthy (coffee)" b
+expect(${1:target}).not.toBeTruthy()
+endsnippet
+
+snippet notf "expect not to be falsy (coffee)" b
+expect(${1:target}).not.toBeFalsy()
+endsnippet
+
+snippet notd "expect not to be defined (coffee)" b
+expect(${1:target}).not.toBeDefined()
+endsnippet
+
+snippet notn "expect not to be null (coffee)" b
+expect(${1:target}).not.toBeNull()
+endsnippet
+
+snippet notc "expect not to contain (coffee)" b
+expect(${1:target}).not.toContain(${2:value})
+endsnippet
+
+snippet notv "expect not to be visible (coffee)" b
+expect(${1:target}).not.toBeVisible()
+endsnippet
+
+snippet noth "expect not to be hidden (coffee)" b
+expect(${1:target}).not.toBeHidden()
+endsnippet
+
+snippet s "spy on (coffee)" b
+spyOn(${1:object}, "${2:method}")$0
+endsnippet
+
+snippet sr "spy on and return (coffee)" b
+spyOn(${1:object}, "${2:method}").andReturn(${3:arguments})
+endsnippet
+
+snippet st "spy on and throw (coffee)" b
+spyOn(${1:object}, "${2:method}").andThrow(${3:exception})
+endsnippet
+
+snippet sct "spy on and call through (coffee)" b
+spyOn(${1:object}, "${2:method}").andCallThrough()
+endsnippet
+
+snippet scf "spy on and call fake (coffee)" b
+spyOn(${1:object}, "${2:method}").andCallFake(${3:function})
+endsnippet
+
+snippet esc "expect was called (coffee)" b
+expect(${1:target}).wasCalled()
+endsnippet
+
+snippet escw "expect was called with (coffee)" b
+expect(${1:target}).wasCalledWith(${2:arguments})
+endsnippet
+
+snippet notsc "expect was not called (coffee)" b
+expect(${1:target}).wasNotCalled()
+endsnippet
+
+snippet noscw "expect was not called with (coffee)" b
+expect(${1:target}).wasNotCalledWith(${2:arguments})
+endsnippet
+

.vim/UltiSnips/jasmine_javascript.snippets

+#
+# JavaScript versions -- from the TextMate bundle + some additions
+# for jasmine-jquery matchers
+#
+extends javascript
+
+snippet des "Describe (js)" b
+describe('${1:description}', function() {
+	$0
+});
+endsnippet
+
+snippet it "it (js)" b
+it('${1:description}', function() {
+	$0
+});
+endsnippet
+
+snippet bef "before each (js)" b
+beforeEach(function() {
+	$0
+});
+endsnippet
+
+snippet aft "after each (js)" b
+afterEach(function() {
+	$0
+});
+endsnippet
+
+snippet any "any (js)" b
+jasmine.any($1)
+endsnippet
+
+snippet ru "runs (js)" b
+runs(function() {
+	$0
+});
+endsnippet
+
+snippet wa "waits (js)" b
+waits($1);
+endsnippet
+
+snippet ex "expect (js)" b
+expect(${1:target})$0;
+endsnippet
+
+snippet ee "expect to equal (js)" b
+expect(${1:target}).toEqual(${2:value});
+endsnippet
+
+snippet em "expect to match (js)" b
+expect(${1:target}).toMatch(${2:pattern});
+endsnippet
+
+snippet eha "expect to have attribute (js)" b
+expect(${1:target}).toHaveAttr('${2:attr}'${3:, '${4:value}'});
+endsnippet
+
+snippet et "expect to be truthy (js)" b
+expect(${1:target}).toBeTruthy();
+endsnippet
+
+snippet ef "expect to be falsy (js)" b
+expect(${1:target}).toBeFalsy();
+endsnippet
+
+snippet ed "expect to be defined (js)" b
+expect(${1:target}).toBeDefined();
+endsnippet
+
+snippet en "expect to be null (js)" b
+expect(${1:target}).toBeNull();
+endsnippet
+
+snippet ec "expect to contain (js)" b
+expect(${1:target}).toContain(${2:value});
+endsnippet
+
+snippet ev "expect to be visible (js)" b
+expect(${1:target}).toBeVisible();
+endsnippet
+
+snippet eh "expect to be hidden (js)" b
+expect(${1:target}).toBeHidden();
+endsnippet
+
+snippet notx "expect not (js)" b
+expect(${1:target}).not$0;
+endsnippet
+
+snippet note "expect not to equal (js)" b
+expect(${1:target}).not.toEqual(${2:value});
+endsnippet
+
+snippet notm "expect not to match (js)" b
+expect(${1:target}).not.toMatch(${2:pattern});
+endsnippet
+
+snippet notha "expect to not have attribute (js)" b
+expect(${1:target}).not.toHaveAttr('${2:attr}'${3:, '${4:value}'});
+endsnippet
+
+snippet nott "expect not to be truthy (js)" b
+expect(${1:target}).not.toBeTruthy();
+endsnippet
+
+snippet notf "expect not to be falsy (js)" b
+expect(${1:target}).not.toBeFalsy();
+endsnippet
+
+snippet notd "expect not to be defined (js)" b
+expect(${1:target}).not.toBeDefined();
+endsnippet
+
+snippet notn "expect not to be null (js)" b
+expect(${1:target}).not.toBeNull();
+endsnippet
+
+snippet notc "expect not to contain (js)" b
+expect(${1:target}).not.toContain(${2:value});
+endsnippet
+
+snippet notv "expect not to be visible (js)" b
+expect(${1:target}).not.toBeVisible();
+endsnippet
+
+snippet noth "expect not to be hidden (js)" b
+expect(${1:target}).not.toBeHidden();
+endsnippet
+
+snippet s "spy on (js)" b
+spyOn(${1:object}, '${2:method}')$0;
+endsnippet
+
+snippet sr "spy on and return (js)" b
+spyOn(${1:object}, '${2:method}').andReturn(${3:arguments});
+endsnippet
+
+snippet st "spy on and throw (js)" b
+spyOn(${1:object}, '${2:method}').andThrow(${3:exception});
+endsnippet
+
+snippet sct "spy on and call through (js)" b
+spyOn(${1:object}, '${2:method}').andCallThrough();
+endsnippet
+
+snippet scf "spy on and call fake (js)" b
+spyOn(${1:object}, '${2:method}').andCallFake(${3:function});
+endsnippet
+
+snippet esc "expect was called (js)" b
+expect(${1:target}).wasCalled();
+endsnippet
+
+snippet escw "expect was called with (js)" b
+expect(${1:target}).wasCalledWith(${2:arguments});
+endsnippet
+
+snippet notsc "expect was not called (js)" b
+expect(${1:target}).wasNotCalled();
+endsnippet
+
+snippet noscw "expect was not called with (js)" b
+expect(${1:target}).wasNotCalledWith(${2:arguments});
+endsnippet
+

.vim/UltiSnips/javascript_jasmine.snippets

-#
-# JavaScript versions -- from the TextMate bundle + some additions
-# for jasmine-jquery matchers
-#
-extends javascript
-
-snippet des "Describe (js)" b
-describe('${1:description}', function() {
-	$0
-});
-endsnippet
-
-snippet it "it (js)" b
-it('${1:description}', function() {
-	$0
-});
-endsnippet
-
-snippet bef "before each (js)" b
-beforeEach(function() {
-	$0
-});
-endsnippet
-
-snippet aft "after each (js)" b
-afterEach(function() {
-	$0
-});
-endsnippet
-
-snippet any "any (js)" b
-jasmine.any($1)
-endsnippet
-
-snippet ru "runs (js)" b
-runs(function() {
-	$0
-});
-endsnippet
-
-snippet wa "waits (js)" b
-waits($1);
-endsnippet
-
-snippet ex "expect (js)" b
-expect(${1:target})$0;
-endsnippet
-
-snippet ee "expect to equal (js)" b
-expect(${1:target}).toEqual(${2:value});
-endsnippet
-
-snippet em "expect to match (js)" b
-expect(${1:target}).toMatch(${2:pattern});
-endsnippet
-
-snippet eha "expect to have attribute (js)" b
-expect(${1:target}).toHaveAttr('${2:attr}'${3:, '${4:value}'});
-endsnippet
-
-snippet et "expect to be truthy (js)" b
-expect(${1:target}).toBeTruthy();
-endsnippet
-
-snippet ef "expect to be falsy (js)" b
-expect(${1:target}).toBeFalsy();
-endsnippet
-
-snippet ed "expect to be defined (js)" b
-expect(${1:target}).toBeDefined();
-endsnippet
-
-snippet en "expect to be null (js)" b
-expect(${1:target}).toBeNull();
-endsnippet
-
-snippet ec "expect to contain (js)" b
-expect(${1:target}).toContain(${2:value});
-endsnippet
-
-snippet ev "expect to be visible (js)" b
-expect(${1:target}).toBeVisible();
-endsnippet
-
-snippet eh "expect to be hidden (js)" b
-expect(${1:target}).toBeHidden();
-endsnippet
-
-snippet notx "expect not (js)" b
-expect(${1:target}).not$0;
-endsnippet
-
-snippet note "expect not to equal (js)" b
-expect(${1:target}).not.toEqual(${2:value});
-endsnippet
-
-snippet notm "expect not to match (js)" b
-expect(${1:target}).not.toMatch(${2:pattern});
-endsnippet
-
-snippet notha "expect to not have attribute (js)" b
-expect(${1:target}).not.toHaveAttr('${2:attr}'${3:, '${4:value}'});
-endsnippet
-
-snippet nott "expect not to be truthy (js)" b
-expect(${1:target}).not.toBeTruthy();
-endsnippet
-
-snippet notf "expect not to be falsy (js)" b
-expect(${1:target}).not.toBeFalsy();
-endsnippet
-
-snippet notd "expect not to be defined (js)" b
-expect(${1:target}).not.toBeDefined();
-endsnippet
-
-snippet notn "expect not to be null (js)" b
-expect(${1:target}).not.toBeNull();
-endsnippet
-
-snippet notc "expect not to contain (js)" b
-expect(${1:target}).not.toContain(${2:value});
-endsnippet
-
-snippet notv "expect not to be visible (js)" b
-expect(${1:target}).not.toBeVisible();
-endsnippet
-
-snippet noth "expect not to be hidden (js)" b
-expect(${1:target}).not.toBeHidden();
-endsnippet
-
-snippet s "spy on (js)" b
-spyOn(${1:object}, '${2:method}')$0;
-endsnippet
-
-snippet sr "spy on and return (js)" b
-spyOn(${1:object}, '${2:method}').andReturn(${3:arguments});
-endsnippet
-
-snippet st "spy on and throw (js)" b
-spyOn(${1:object}, '${2:method}').andThrow(${3:exception});
-endsnippet
-
-snippet sct "spy on and call through (js)" b
-spyOn(${1:object}, '${2:method}').andCallThrough();
-endsnippet
-
-snippet scf "spy on and call fake (js)" b
-spyOn(${1:object}, '${2:method}').andCallFake(${3:function});
-endsnippet
-
-snippet esc "expect was called (js)" b
-expect(${1:target}).wasCalled();
-endsnippet
-
-snippet escw "expect was called with (js)" b
-expect(${1:target}).wasCalledWith(${2:arguments});
-endsnippet
-
-snippet notsc "expect was not called (js)" b
-expect(${1:target}).wasNotCalled();
-endsnippet
-
-snippet noscw "expect was not called with (js)" b
-expect(${1:target}).wasNotCalledWith(${2:arguments});
-endsnippet
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.