From ec973080f47fe038f076db97eeff44bc46d3e54b Mon Sep 17 00:00:00 2001 From: Ryan Pineo Date: Mon, 21 Apr 2014 14:07:28 -0400 Subject: [PATCH 1/2] Add angular snippets. Add two jasmine snippets for use with angular that prepoulate the "it" and "before" functions with "inject". Add an angular config snippet. --- UltiSnips/javascript_angular.snippets | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 UltiSnips/javascript_angular.snippets diff --git a/UltiSnips/javascript_angular.snippets b/UltiSnips/javascript_angular.snippets new file mode 100644 index 0000000..23b93e3 --- /dev/null +++ b/UltiSnips/javascript_angular.snippets @@ -0,0 +1,19 @@ +priority -50 + +snippet iti "it (js, inject)" b +it('${1:description}', inject(function($2) { + $0 +})); +endsnippet + +snippet befi "before each (js, inject)" b +beforeEach(inject(function($1) { + $0 +})); +endsnippet + +snippet acon "angular config" i +config(function($1) { + $0 +}); +endsnippet From b1af469ff76e5cfee0b809f89f6976ee5738950e Mon Sep 17 00:00:00 2001 From: Ryan Pineo Date: Mon, 21 Apr 2014 14:12:28 -0400 Subject: [PATCH 2/2] Rename angular config. Add angular controller. --- UltiSnips/javascript_angular.snippets | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/UltiSnips/javascript_angular.snippets b/UltiSnips/javascript_angular.snippets index 23b93e3..76e9ca1 100644 --- a/UltiSnips/javascript_angular.snippets +++ b/UltiSnips/javascript_angular.snippets @@ -12,8 +12,14 @@ beforeEach(inject(function($1) { })); endsnippet -snippet acon "angular config" i +snippet aconf "angular config" i config(function($1) { $0 }); endsnippet + +snippet acont "angular controller" i +controller('${1:name}', function($2) { + $0 +}); +endsnippet