Skip to content

Commit

Permalink
detect coffee from shebang line
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Côté-Roy authored and kchmck committed Feb 14, 2012
1 parent 319700c commit cdd52c8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ftdetect/coffee.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
autocmd BufNewFile,BufRead *.coffee set filetype=coffee
autocmd BufNewFile,BufRead *Cakefile set filetype=coffee
autocmd BufNewFile,BufRead *.coffeekup set filetype=coffee

fun! s:DetectCoffee()
if getline(1) =~ '^#!.*\<coffee\>'
set filetype=coffee
endif
endfun
autocmd BufNewFile,BufRead * call s:DetectCoffee()



0 comments on commit cdd52c8

Please sign in to comment.