diff --git a/Commands/Install.tmCommand b/Commands/Install.tmCommand index 5adad12..b3f7e5a 100644 --- a/Commands/Install.tmCommand +++ b/Commands/Install.tmCommand @@ -10,7 +10,7 @@ def could_not_locate puts "<span style='color:red'>There was a problem</span><br/>" puts "Probably, you do not have SuperCollider installed, or you are using a non-standard user support directory.<br/><br/>" - puts "You will need to manually copy <code>supercollider-tmbundle/Support/classes/TextMate.sc</code> into your SC class path" + puts "You will need to manually link <code>supercollider-tmbundle/Support/classes/TextMate.sc</code> into your SC class path" end puts "=======================================<br/>" @@ -44,7 +44,7 @@ end keyEquivalent $@ name - Install + Complete installation output showAsHTML scope diff --git a/README.textile b/README.textile index cf8821c..5b033ff 100644 --- a/README.textile +++ b/README.textile @@ -8,6 +8,8 @@ h2. Requirements A "recent build":http://sourceforge.net/projects/supercollider of SC (>= 3.3 alpha) +"TextMate":http://macromates.com, with terminal usage enabled (see Help -> Terminal Usage in TM menu) + h2. Installation h3. With git @@ -20,6 +22,10 @@ h3. With git @osascript -e 'tell app "TextMate" to reload bundles'@ +In Textmate menu: Bundles > SuperCollider > Complete installation + + + h3. Without git @mkdir -p ~/Library/Application\ Support/TextMate/Bundles@ @@ -36,13 +42,13 @@ h3. Without git @osascript -e 'tell app "TextMate" to reload bundles'@ -h3. After installing +In Textmate menu: Bundles > SuperCollider > Complete installation -* Open TextMate and select 'SuperCollider' bundle -* Press CMD-SHIFT-F1 to complete installation. h2. Key controls +All key controls can be reprogrammed in Bundles editor. + * @ENTER@
Execute current selection/line * @CTRL-PERIOD@
@@ -70,23 +76,25 @@ Post window to front Clear post window * @CMD-ALT-CTRL-S@
-Switch to SuperCollider mode +Switch to SuperCollider bundle
*plus* various snippets - check the bundle. -h2. Limitations +h2. Notes TextMate does not handle .rtf documents. So .rtf files will have to be copy-and-pasted into .sc text files. This is not a problem for classes. +Some controls (browse class file, etc) depend upon TM terminal command (see Help -> Terminal Usage in TM menu) + CMD-period cannot be programmed in TextMate, so to stop audio output use CTRL-period instead -Class lib can only currently be recompiled from within TextMate (CMD-K) if there's been no previous error compiling it. Recompile from within SC in that case - -h2. Notes - I've extracted the underlying code to allow control of SC.app from any command line application.
"sc3ctrl on github":http://github.com/rfwatson/sc3ctrl +h2. TODO + +Might repackage this as a quark .. ? + h2. Contact me Via "github":http://github.com/rfwatson \ No newline at end of file diff --git a/Snippets/_isNil.tmSnippet b/Snippets/_isNil.tmSnippet new file mode 100644 index 0000000..bf0b084 --- /dev/null +++ b/Snippets/_isNil.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .isNil + name + .isNil + scope + source.supercollider + tabTrigger + .n + uuid + ABFD1872-DD86-4099-B758-28E319EF479D + + diff --git a/Snippets/_notNil.tmSnippet b/Snippets/_notNil.tmSnippet new file mode 100644 index 0000000..dc590d7 --- /dev/null +++ b/Snippets/_notNil.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .notNil + name + .notNil + scope + source.supercollider + tabTrigger + .nn + uuid + A138C3A1-AEF7-4C4A-AD57-80B0564A61A8 + + diff --git a/Snippets/interpolation.tmSnippet b/Snippets/interpolation.tmSnippet new file mode 100644 index 0000000..b36c3c7 --- /dev/null +++ b/Snippets/interpolation.tmSnippet @@ -0,0 +1,14 @@ + + + + + content + interpolation: + name + interpolation + tabTrigger + int + uuid + D36563CB-A0CE-43EB-8F19-2EF1D5E42B81 + + diff --git a/Support/classes/TextMate.sc b/Support/classes/TextMate.sc index b33fc17..2d9be7a 100755 --- a/Support/classes/TextMate.sc +++ b/Support/classes/TextMate.sc @@ -23,37 +23,40 @@ TextMate { }; try { - menu = CocoaMenuItem(nil, 7, "TextMate", true); + menu = SCMenuGroup(nil, "TextMate", 7); - opt = CocoaMenuItem(menu, 0, "TextMate to front", false) { - "osascript << END - tell application \"TextMate\" to activate - END - ".unixCmd(postOutput: false) - }; - opt.setShortCut("T"); - - openClassInTextMate = CocoaMenuItem(menu, 1, "Open class files in TextMate", false) { |item| - item.state = item.state.not; - this.saveState; - }; - openClassInTextMate.state = settings.classfiles; - - openReferencesInTextMate = CocoaMenuItem(menu, 2, "Open references in TextMate", false) { |item| - item.state = item.state.not; - this.saveState; - }; - openReferencesInTextMate.state = settings.references; + opt = SCMenuItem(menu, "TextMate to front") + .action_{ + "osascript << END + tell application \"TextMate\" to activate + END + ".unixCmd(postOutput: false) + } + .setShortCut("T"); - CocoaMenuItem(menu, 3, "About SuperCollider bundle", false) { |item| - Document.new.string = "TextMate-SuperCollider bundle + SCMenuSeparator(menu); -by R.Watson + openClassInTextMate = SCMenuItem(menu, "Open class files in TextMate") + .action_{ |item| + item.state = item.state.not; + this.saveState; + } + .state_(settings.classfiles); + + openReferencesInTextMate = SCMenuItem(menu, "Open references in TextMate") + .action_{ |item| + item.state = item.state.not; + this.saveState; + } + .state_(settings.references); -For documentation and source code, -http://rfwatson.github.com" - }; - } { + SCMenuSeparator(menu, 4); + + SCMenuItem(menu, "About SuperCollider bundle") + .action_{ |item| + "open 'http://github.com/rfwatson/supercollider-tmbundle'".unixCmd(postOutput:false); + } + } { "TextMate found a problem installing CocoaMenuItems - you may be running SC 3.2 or older, or booting from command-line.".warn } } diff --git a/info.plist b/info.plist index 2bfc0e9..114942f 100644 --- a/info.plist +++ b/info.plist @@ -38,6 +38,10 @@ 293C4F9B-E1A4-4D01-83E7-0698112C7FA4 3BAE7DE4-D06A-422B-94A3-7F542C47ED0F 22917CBF-054E-49ED-8AFA-7B72C0CFFA3A + A138C3A1-AEF7-4C4A-AD57-80B0564A61A8 + ABFD1872-DD86-4099-B758-28E319EF479D + BB37ACE9-8262-4AF6-B3C6-43DC0AF2B370 + D36563CB-A0CE-43EB-8F19-2EF1D5E42B81 uuid 7613A472-3FAB-454C-8CF2-2E62F0D00920