Ensime in Sublime is kinda pointless I think since it only updates on file change. The REPL and SBT integration is nice.
I use Sublime for quick examples in Scala, or as a VIM alternative for larger projects (as opposed to my main editor like with Ruby).
For most of my Scala work I use IntelliJ though. The lack of half-decent theming in Eclipse and Preferences/Settings being all over the place really puts me off ScalaIDE personally.
Going from Zero to Code in IntelliJ and SBT (on OSX) is pretty trivial. Given a command-line "Hello World" with a traditional Maven layout:
First, install IntelliJ, navigate to "Plugins" under preferences and install the Scala plugin.
Now make sure you have Homebrew installed (http://brew.sh)
$ brew update
$ brew install sbt --devel # currently 0.13.0-RC5
$ cd ~/src/
$ mkdir hello-world
$ cd hello-world
$ mkdir project
$ echo "sbt.version=0.13.0-RC5" | tee project/build.properties
$ cat <<EOS | tee project/plugins.sbt
resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.0-SNAPSHOT")
EOS
$ cat <<EOS | tee build.sbt
name := "hello-world"
version := "1.0-SNAPSHOT"
EOS
$ mkdir -p src/main/scala
$ cat <<EOS | tee src/main/scala/Whatever.scala
object Whatever extends App {
println("Hello World!")
}
EOS
$ sbt
> compile
> gen-idea
> run
And there you go. It could be simpler if we were having a LOC competition, but this is actually very close to the exact setup I use for projects day in and day out, including getting a jump on the next version of SBT and best-practicey stuff like setting the SBT version in build.properties.
If this were a Play app, you might have a "project/plugins.sbt" that looked something like this (to get a jump on the upcoming Scala 2.10 version of Play, that integrates with SBT 0.13.x):
// Comment to get more information during initialization
logLevel := Level.Warn
resolvers := Seq("Maven Central" at "http://repo1.maven.org/maven2/",
"Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/",
"Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/",
"Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0-M2")
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.0-SNAPSHOT")
This just adds a few more common resolvers you might use for dependencies, and locks you to the latest Play milestone snapshot. You can pretty much otherwise copy/paste files/folders from a sample Play app, like you might see with the Typesafe Activator for example.
there's this https://github.com/n8han/giter8 project that's supposed to create scala project templates for you from the command line, but never really got into it so i can't really comment.
Ensime in Sublime is kinda pointless I think since it only updates on file change. The REPL and SBT integration is nice.
I use Sublime for quick examples in Scala, or as a VIM alternative for larger projects (as opposed to my main editor like with Ruby).
For most of my Scala work I use IntelliJ though. The lack of half-decent theming in Eclipse and Preferences/Settings being all over the place really puts me off ScalaIDE personally.
Going from Zero to Code in IntelliJ and SBT (on OSX) is pretty trivial. Given a command-line "Hello World" with a traditional Maven layout:
First, install IntelliJ, navigate to "Plugins" under preferences and install the Scala plugin.
Now make sure you have Homebrew installed (http://brew.sh)
And there you go. It could be simpler if we were having a LOC competition, but this is actually very close to the exact setup I use for projects day in and day out, including getting a jump on the next version of SBT and best-practicey stuff like setting the SBT version in build.properties.If this were a Play app, you might have a "project/plugins.sbt" that looked something like this (to get a jump on the upcoming Scala 2.10 version of Play, that integrates with SBT 0.13.x):
This just adds a few more common resolvers you might use for dependencies, and locks you to the latest Play milestone snapshot. You can pretty much otherwise copy/paste files/folders from a sample Play app, like you might see with the Typesafe Activator for example.Good luck!