derekwyatt / vim-scala

My work on integration of Scala into Vim - not a ton here, but useful for me.
http://derekwyatt.org
Apache License 2.0
1.09k stars 144 forks source link

Suffix .sc is not supported #132

Closed kuchaguangjie closed 8 years ago

kuchaguangjie commented 8 years ago

If I name a scala source code with suffix .sc, then vim-scala won't highlight it, how to fix that, thanks.

kuchaguangjie commented 8 years ago

I just found a solution by viewing the source code in my machine,

just need to add a line in vim-scala/ftdetect/scala.vim, as:

au BufRead,BufNewFile *.sc set filetype=scala

Maybe, it's better to merge that into the source code :)

ches commented 8 years ago

I've not seen this to be a common convention so I don't know if we'd add it to the plugin proper, but if you'd like to support it in your personal configuration you should be able to add something like this to your vimrc:

autocmd BufRead,BufNewFile *.sc set filetype=scala
kuchaguangjie commented 8 years ago

@ches I am very new to scala, but on wikipedia scala page, it says file name is .scala or .sc. So, I guess the plugin should support that by default, because 1) it's much shorter, it's convenient especially when on vi, 2) no body else use .sc so far.