Skip to content

Instantly share code, notes, and snippets.

@jamesthompson
Last active January 3, 2016 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesthompson/8413396 to your computer and use it in GitHub Desktop.
Save jamesthompson/8413396 to your computer and use it in GitHub Desktop.
sbt build file for sublime if sbt script is present in project path
{
"cmd": ["sbt"],
"file_regex": "^\\[error\\] ([.a-zA-Z0-9/-]+[.]scala):([0-9]+):",
"selector": "source.scala",
"working_dir": "${project_path:${folder}}",
"variants": [
{
"name": "sbt_compile",
"cmd": ["${project_path:${folder}}/sbt compile"],
"shell": true
},
{
"name": "sbt_test",
"cmd": ["${project_path:${folder}}/sbt test"],
"shell": true
},
{
"name": "sbt_run",
"cmd": ["${project_path:${folder}}/sbt run"],
"shell": true
}
]
}
//n.b. Don't forget to add -Dsbt.log.noformat=true to Java opts for no color outputting and therefore sublime console compatibility
// key bindings are:
[
{ "keys": ["super+option+c"], "command": "build", "args": {"variant": "sbt_compile"} },
{ "keys": ["super+option+t"], "command": "build", "args": {"variant": "sbt_test"} },
{ "keys": ["super+option+r"], "command": "build", "args": {"variant": "sbt_run"} }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment