mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 03:00:06 +08:00
12 lines
328 B
VimL
12 lines
328 B
VimL
fun! s:DetectScala()
|
|
if getline(1) =~# '^#!\(/usr\)\?/bin/env\s\+scalas\?'
|
|
set filetype=scala
|
|
endif
|
|
endfun
|
|
|
|
au BufRead,BufNewFile *.scala,*.sc set filetype=scala
|
|
au BufRead,BufNewFile * call s:DetectScala()
|
|
|
|
" Install vim-sbt for additional syntax highlighting.
|
|
au BufRead,BufNewFile *.sbt setfiletype sbt.scala
|