From 01fe1500df97577452f755b526c09d8ed0c802ea Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Thu, 12 Sep 2013 16:17:03 +0200 Subject: Add support for basic languages coffee, cucumbeer, eruby, haml, haskell, javascript, json, less, nginx, ocaml, ruby, sass, scss, slim, stylus, textile, tmux --- ftdetect/coffee.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ftdetect/coffee.vim (limited to 'ftdetect/coffee.vim') diff --git a/ftdetect/coffee.vim b/ftdetect/coffee.vim new file mode 100644 index 00000000..50569298 --- /dev/null +++ b/ftdetect/coffee.vim @@ -0,0 +1,17 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" URL: http://github.com/kchmck/vim-coffee-script +" License: WTFPL + +autocmd BufNewFile,BufRead *.coffee set filetype=coffee +autocmd BufNewFile,BufRead *Cakefile set filetype=coffee +autocmd BufNewFile,BufRead *.coffeekup,*.ck set filetype=coffee +autocmd BufNewFile,BufRead *._coffee set filetype=coffee + +function! s:DetectCoffee() + if getline(1) =~ '^#!.*\' + set filetype=coffee + endif +endfunction + +autocmd BufNewFile,BufRead * call s:DetectCoffee() -- cgit v1.2.3