05 December 2012

VIM Syntax Highlighting for Scala: A Bash One-Liner

Just for posterity, here is a Bash one-liner to download the VIM plugins to handle syntax highlighting for Scala:
$ mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do wget --no-check-certificate -O ~/.vim/$d/scala.vim https://raw.github.com/scala/scala-dist/master/tool-support/src/vim/$d/scala.vim; done
Update

Here is a solution using cURL submitted by Joe:
mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do curl -o ~/.vim/$d/scala.vim https://raw.github.com/scala/scala-dist/master/tool-support/src/vim/$d/scala.vim; done

11 comments:

  1. Thanks bro, works saved me some work!

    ReplyDelete
  2. Substituting cURL:

    mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do curl -o ~/.vim/$d/scala.vim https://raw.github.com/scala/scala-dist/master/tool-support/src/vim/$d/scala.vim; done

    ReplyDelete
  3. I can use the 5 minutes I gained getting Scala syntax highlighting from this post to tell you how much I like it :). But seriously, thanks! I know I'll use it again on some other machine ... somewhere.

    ReplyDelete
  4. Nice work Bruce. (hope all is well)

    ReplyDelete