diff --git a/SuperCollider.tmbundle/Commands/Restart.tmCommand b/SuperCollider.tmbundle/Commands/Restart.tmCommand index ff94c08..5372255 100644 --- a/SuperCollider.tmbundle/Commands/Restart.tmCommand +++ b/SuperCollider.tmbundle/Commands/Restart.tmCommand @@ -3,7 +3,7 @@ beforeRunningCommand - saveActiveFile + nop command require_cmd sc3c sc3c -k @@ -14,7 +14,7 @@ sc3c -k name Recompile class library output - discard + showAsTooltip scope source.supercollider uuid diff --git a/TextMate.sc b/TextMate.sc old mode 100644 new mode 100755 index 7c45b66..89eb0b3 --- a/TextMate.sc +++ b/TextMate.sc @@ -1,5 +1,28 @@ -// http://github.com/rfwatson/sc3ctrl +TextMate { + classvar menu, /tmp/grepout.tmp"; + cmd.unixCmd(postOutput: false, action: { + File.use("/tmp/grepout.tmp", "r") { |f| + var content = f.readAllString; + var split = content.split($:); + if("^[0-9]+$".matchRegexp(split.first.asString)) { + ("mate -l" ++ split.first + "\"" ++ fname ++ "\"").postln.unixCmd(postOutput: false); + } { + ("mate" + fname).unixCmd(postOutput: false); + } + }; + }); + } + } { // open in SC.app + klass.interpret.openCodeFile; + }; + }.defer }.add; nodes.add(node); @@ -48,7 +95,7 @@ SC3Controller { { SC3Controller.methodReferences(msg[1]) }.defer }.add; nodes.add(node); - + node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg| thisProcess.stop; nil; }.add;