How to add support of scala syntax highlighting in VIM?

How to configure VIM to be able to highlight scala language (.scala files extension)?

Current VIM configuration (.vimrc file): :syntax on

1 Answer

  1. Download the scala.vim file from here to e.g. ~/.vim/syntax directory.

  2. Edit your ~/.vimrc file and add the following:

    au BufRead,BufNewFile *.scala set filetype=scala
    au! Syntax scala source ~/.vim/syntax/scala.vim

source: Scala syntax highlighting in VIM

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like