summaryrefslogtreecommitdiffstats
path: root/ftdetect/polyglot.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r--ftdetect/polyglot.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index a63014d8..5eaa9325 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -650,6 +650,27 @@ au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,i
augroup end
endif
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1
+ augroup filetypedetect
+ " moonscript, from moon.vim in leafo/moonscript-vim
+" Language: MoonScript
+" Maintainer: leafo <leafot@gmail.com>
+" Based On: CoffeeScript by Mick Koch <kchmck@gmail.com>
+" URL: http://github.com/leafo/moonscript-vim
+" License: WTFPL
+
+autocmd BufNewFile,BufRead *.moon set filetype=moon
+
+function! s:DetectMoon()
+ if getline(1) =~ '^#!.*\<moon\>'
+ set filetype=moon
+ endif
+endfunction
+
+autocmd BufNewFile,BufRead * call s:DetectMoon()
+ augroup end
+endif
+
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
augroup filetypedetect
" nginx, from nginx.vim in chr4/nginx.vim