diff --git a/vim/snippets/javascript-jasmin.snippets b/vim/snippets/javascript-jasmin.snippets new file mode 100644 index 0000000..88143bd --- /dev/null +++ b/vim/snippets/javascript-jasmin.snippets @@ -0,0 +1,60 @@ +# Describe +snippet des + describe('${1:description}', function(${2}) { + ${3} + }); + +# After Each +snippet aft + afterEach(function(${1}) { + ${2} + });${0} + +# Before Each +snippet bef + beforeEach(function(${1}) { + ${2} + }); + +# It +snippet it + it('${1:description}', function(${2}) { + ${3} + }); + +# Stub +snippet stub + sandbox.stub(${1:target},'${2:function}');${3} + +# Spy +snippet spy + sandbox.spy(${1:target},'${2:function}');${3} + +# Expect not to be defined +snippet end + expect(${1:target}).not.toBeDefined();${2} + +# Expect not to contain +snippet enc + expect(${1:target}).not.toContain(${2:value});${3} + +# Expect not to equal +snippet ene + expect(${1:target}).not.toEqual(${2:value});${3} + +# Expect not +snippet enx + expect(${1:target}).not.${2};${3} + +# Expect to be defined +snippet etd + expect(${1:target}).toBeDefined();${2} + +# Expect to contain +snippet etc + expect(${1:target}).toContain(${2:value});${3} + +# Expect to equal +snippet ete + expect(${1:target}).toEqual(${2:value});${3} + diff --git a/vim/snippets/javascript.snippets b/vim/snippets/javascript.snippets new file mode 100644 index 0000000..e24d0d6 --- /dev/null +++ b/vim/snippets/javascript.snippets @@ -0,0 +1,11 @@ +# requirejs +snippet def + define([ + ${1} + ], function( + ${2} + ){ + 'use strict'; + + ${3} + }); diff --git a/vimrc b/vimrc index a520f2c..60f930d 100644 --- a/vimrc +++ b/vimrc @@ -30,6 +30,10 @@ Plugin 'airblade/vim-gitgutter' Plugin 'vim-airline', {'name': 'airline'} Plugin 'flazz/vim-colorschemes' +Plugin 'snipMate' + +Plugin 'mustache/vim-mustache-handlebars' + " All of your Plugins must be added before the following line call vundle#end() " required @@ -240,18 +244,11 @@ au FileType human,mail,tex set expandtab textwidth=78 nocindent "" LANGUAGE SPECIFIC -" CSS -au FileType css set expandtab tabstop=2 shiftwidth=2 - -" HTML -au FileType html,xhtml set formatoptions+=tl -au FileType html,xhtml set foldmethod=indent smartindent -au FileType html,xhtml set expandtab tabstop=3 shiftwidth=3 -au FileType html,php,xhtml,jsp,ejs let b:delimitMate_matchpairs = "(:),[:],{:}" - " Python au FileType python set noexpandtab " JavaScript -au FileType javascript setlocal ts=4 sts=4 sw=4 au BufRead,BufNewFile *.json set ft=json + +" Mustache +au BufRead,BufNewFile *.template set filetype=html syntax=mustache