Skip to content

Commit

Permalink
add coffeescript highlighting support
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbintz committed May 14, 2011
1 parent a590c07 commit de6d38b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ h2. What it does

This plugin is pretty basic right now. It currently:

* Sets *Spec.js and *SpecHelper.js files to filetype=jasmine+javascript
* Sets *Spec.js and *SpecHelper.js files to filetype=jasmine.javascript syntax=jasmine
* Sets *Spec.coffee and *SpecHelper.coffee files to filetype=jasmine.coffee syntax=jasmine
* Applies basic syntax highlighting for jasmine keywords in addition to normal javascript syntax
* Loads snippets for the jasmine filetype for:
** desc: description block with before..it..expect
Expand Down
1 change: 1 addition & 0 deletions ftdetect/jasmine.vim
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
autocmd BufNewFile,BufRead,BufWritePost *Spec.js,*SpecHelper.js set filetype=jasmine.javascript syntax=jasmine
autocmd BufNewFile,BufRead,BufWritePost *Spec.coffee,*SpecHelper.coffee set filetype=jasmine.coffee syntax=jasmine
6 changes: 5 additions & 1 deletion syntax/jasmine.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ if exists("b:current_syntax")
finish
endif

runtime! syntax/javascript.vim
if &ft =~ "coffee"
runtime! syntax/coffee.vim
else
runtime! syntax/javascript.vim
endif

syn case match
syn keyword specFunctions afterEach beforeEach describe it expect addMatchers spyOn not
Expand Down

0 comments on commit de6d38b

Please sign in to comment.