Compare commits
14 Commits
old-cocoam
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
80d4cbfae1 | ||
|
98c779684b | ||
|
1bd7dc79e2 | ||
|
326c83c145 | ||
|
e71bcf18c6 | ||
|
e2c13bbc83 | ||
|
ec3d0d1ff5 | ||
|
89337785a9 | ||
|
9d040a8024 | ||
|
53d22df833 | ||
|
a6a09d97a9 | ||
|
1081a9ebc3 | ||
|
f49e2fbb9a | ||
|
508fb4719e |
@ -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
|
||||
<key>keyEquivalent</key>
|
||||
<string>$@</string>
|
||||
<key>name</key>
|
||||
<string>Install</string>
|
||||
<string>Complete installation</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
|
@ -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@<br/>Execute current selection/line
|
||||
|
||||
* @CTRL-PERIOD@<br/>
|
||||
@ -69,24 +75,26 @@ Post window to front
|
||||
* @CMD-SHIFT-C@<br/>
|
||||
Clear post window
|
||||
|
||||
* @CMD-ALT-CTRL-S@<br/>
|
||||
Switch to SuperCollider mode
|
||||
* @ALT-CTRL-SHIFT-S@<br/>
|
||||
Switch to SuperCollider bundle
|
||||
|
||||
<br/>
|
||||
*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.<br/>"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
|
16
Snippets/All Class Vars.tmSnippet
Normal file
16
Snippets/All Class Vars.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.classVarNames.dump;</string>
|
||||
<key>name</key>
|
||||
<string>All Class Vars</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.acvars</string>
|
||||
<key>uuid</key>
|
||||
<string>3FC8E89C-7BAF-4C66-9327-C544EBF53DFE</string>
|
||||
</dict>
|
||||
</plist>
|
16
Snippets/All Vars.tmSnippet
Normal file
16
Snippets/All Vars.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.instVarNames.dump;</string>
|
||||
<key>name</key>
|
||||
<string>All Vars</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.avars</string>
|
||||
<key>uuid</key>
|
||||
<string>93CDD123-97D9-40CB-9F63-A6F0A42D8622</string>
|
||||
</dict>
|
||||
</plist>
|
22
Snippets/Break.tmSnippet
Normal file
22
Snippets/Break.tmSnippet
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>block {|break|
|
||||
|
||||
if (${1:true}) { break.value(${2:nil}) };
|
||||
}
|
||||
</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~@b</string>
|
||||
<key>name</key>
|
||||
<string>Break</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>break</string>
|
||||
<key>uuid</key>
|
||||
<string>76D2572D-8E53-4EC8-93C0-2DFADF94E687</string>
|
||||
</dict>
|
||||
</plist>
|
19
Snippets/BugNumbers.tmSnippet
Normal file
19
Snippets/BugNumbers.tmSnippet
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>//
|
||||
$1.postln;
|
||||
//
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>BugNumbers</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>n.</string>
|
||||
<key>uuid</key>
|
||||
<string>4C6C9C58-92F3-4FD2-AE39-00F01AC3F7B2</string>
|
||||
</dict>
|
||||
</plist>
|
17
Snippets/Print Variable.tmSnippet
Normal file
17
Snippets/Print Variable.tmSnippet
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>Post << "$TM_SELECTED_TEXT: " << $TM_SELECTED_TEXT << "\n";
|
||||
</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>~@p</string>
|
||||
<key>name</key>
|
||||
<string>Print Variable</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>uuid</key>
|
||||
<string>C94CF802-251A-44FE-87CB-4C50FA4D4D02</string>
|
||||
</dict>
|
||||
</plist>
|
18
Snippets/While___.tmSnippet
Normal file
18
Snippets/While___.tmSnippet
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>while({${1:condition}}, {
|
||||
${2:do}
|
||||
});</string>
|
||||
<key>name</key>
|
||||
<string>While...</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>while</string>
|
||||
<key>uuid</key>
|
||||
<string>D3FF72CE-4B17-47E2-8A3A-E2E4A6BAC859</string>
|
||||
</dict>
|
||||
</plist>
|
18
Snippets/_any.tmSnippet
Normal file
18
Snippets/_any.tmSnippet
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.any { |${1:i}tem, $1|
|
||||
$2
|
||||
};</string>
|
||||
<key>name</key>
|
||||
<string>.any</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.any</string>
|
||||
<key>uuid</key>
|
||||
<string>DF09CE07-5704-4932-8DC7-86A1ECE54401</string>
|
||||
</dict>
|
||||
</plist>
|
17
Snippets/_collect.tmSnippet
Normal file
17
Snippets/_collect.tmSnippet
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.collect({|${1:i}tem, $1| $2 })
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>.collect</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.collect</string>
|
||||
<key>uuid</key>
|
||||
<string>36B59028-5F9E-4023-B0CB-46BA991E4A0F</string>
|
||||
</dict>
|
||||
</plist>
|
18
Snippets/_every.tmSnippet
Normal file
18
Snippets/_every.tmSnippet
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>every { |${1:i}tem, $1|
|
||||
$2
|
||||
};</string>
|
||||
<key>name</key>
|
||||
<string>.every</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.every</string>
|
||||
<key>uuid</key>
|
||||
<string>43EED273-EF78-473E-8BF0-650D2FC19CCA</string>
|
||||
</dict>
|
||||
</plist>
|
16
Snippets/_get.tmSnippet
Normal file
16
Snippets/_get.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.get(${1:0}, {|msg| ${2:msg.postln}});</string>
|
||||
<key>name</key>
|
||||
<string>.get</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.get</string>
|
||||
<key>uuid</key>
|
||||
<string>43E979D3-9639-4DCC-9E57-24A5C72A30F1</string>
|
||||
</dict>
|
||||
</plist>
|
16
Snippets/_isNil.tmSnippet
Normal file
16
Snippets/_isNil.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.isNil </string>
|
||||
<key>name</key>
|
||||
<string>.isNil</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.n</string>
|
||||
<key>uuid</key>
|
||||
<string>ABFD1872-DD86-4099-B758-28E319EF479D</string>
|
||||
</dict>
|
||||
</plist>
|
16
Snippets/_notNil.tmSnippet
Normal file
16
Snippets/_notNil.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.notNil</string>
|
||||
<key>name</key>
|
||||
<string>.notNil</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.nn</string>
|
||||
<key>uuid</key>
|
||||
<string>A138C3A1-AEF7-4C4A-AD57-80B0564A61A8</string>
|
||||
</dict>
|
||||
</plist>
|
@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.postln</string>
|
||||
<string>.postln;</string>
|
||||
<key>name</key>
|
||||
<string>.postln</string>
|
||||
<key>scope</key>
|
17
Snippets/_select.tmSnippet
Normal file
17
Snippets/_select.tmSnippet
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.select({|${1:i}tem, $1| $2 })
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>.select</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.select</string>
|
||||
<key>uuid</key>
|
||||
<string>A29A295B-A0A4-4E8E-B144-802098C5D806</string>
|
||||
</dict>
|
||||
</plist>
|
16
Snippets/_set.tmSnippet
Normal file
16
Snippets/_set.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.set(\\${1:arg}, ${2:val});</string>
|
||||
<key>name</key>
|
||||
<string>.set</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.set</string>
|
||||
<key>uuid</key>
|
||||
<string>AB35A021-A800-4B82-B603-295CFD714A5B</string>
|
||||
</dict>
|
||||
</plist>
|
19
Snippets/case copy.tmSnippet
Normal file
19
Snippets/case copy.tmSnippet
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>switch ($1)
|
||||
{$2} {$3}
|
||||
{$4} {$5};
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>case copy</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>switch</string>
|
||||
<key>uuid</key>
|
||||
<string>A2B8FE76-A086-4FD3-B832-7154B7CE88F4</string>
|
||||
</dict>
|
||||
</plist>
|
19
Snippets/case.tmSnippet
Normal file
19
Snippets/case.tmSnippet
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>case
|
||||
{$1} {$2}
|
||||
{$3} {$4};
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>case</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>case</string>
|
||||
<key>uuid</key>
|
||||
<string>44331733-E717-4546-BA68-C254284E1089</string>
|
||||
</dict>
|
||||
</plist>
|
16
Snippets/dumpAllMethods.tmSnippet
Normal file
16
Snippets/dumpAllMethods.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.dumpAllMethods;</string>
|
||||
<key>name</key>
|
||||
<string>dumpAllMethods</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.dm</string>
|
||||
<key>uuid</key>
|
||||
<string>78E00F80-2133-42C8-94E8-C570693BEC8E</string>
|
||||
</dict>
|
||||
</plist>
|
16
Snippets/dumpInterface.tmSnippet
Normal file
16
Snippets/dumpInterface.tmSnippet
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.dumpInterface;</string>
|
||||
<key>name</key>
|
||||
<string>dumpInterface</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.di</string>
|
||||
<key>uuid</key>
|
||||
<string>533A6101-A0FB-4F3B-A94A-E04A8DC46C0F</string>
|
||||
</dict>
|
||||
</plist>
|
18
Snippets/if ___ 2.tmSnippet
Normal file
18
Snippets/if ___ 2.tmSnippet
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>if(${1:condition}) {
|
||||
${2:true}
|
||||
};</string>
|
||||
<key>name</key>
|
||||
<string>if ...</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>if</string>
|
||||
<key>uuid</key>
|
||||
<string>44E4E852-1518-4E8C-84F1-9990A1B910ED</string>
|
||||
</dict>
|
||||
</plist>
|
@ -13,7 +13,7 @@
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>if</string>
|
||||
<string>ife</string>
|
||||
<key>uuid</key>
|
||||
<string>C0F1C9B0-6393-4B2B-86B4-40010363DCDE</string>
|
||||
</dict>
|
||||
|
14
Snippets/interpolation.tmSnippet
Normal file
14
Snippets/interpolation.tmSnippet
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>interpolation:</string>
|
||||
<key>name</key>
|
||||
<string>interpolation</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>int</string>
|
||||
<key>uuid</key>
|
||||
<string>D36563CB-A0CE-43EB-8F19-2EF1D5E42B81</string>
|
||||
</dict>
|
||||
</plist>
|
18
Snippets/makeBundle.tmSnippet
Normal file
18
Snippets/makeBundle.tmSnippet
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>.makeBundle(${1:0.2}, {
|
||||
$2
|
||||
});</string>
|
||||
<key>name</key>
|
||||
<string>makeBundle</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>.mb</string>
|
||||
<key>uuid</key>
|
||||
<string>66B16E22-D3FB-464F-B820-2FEEFD79DBA5</string>
|
||||
</dict>
|
||||
</plist>
|
24
Snippets/newClass.tmSnippet
Normal file
24
Snippets/newClass.tmSnippet
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>content</key>
|
||||
<string>${1:Classname} : ${2:Object} {
|
||||
*new { $3
|
||||
^super.new.init$4;
|
||||
}
|
||||
|
||||
init { $5
|
||||
$6
|
||||
}
|
||||
}</string>
|
||||
<key>name</key>
|
||||
<string>Class</string>
|
||||
<key>scope</key>
|
||||
<string>source.supercollider</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>class</string>
|
||||
<key>uuid</key>
|
||||
<string>7581E1DB-6946-44BB-B836-6F5CE5E99B55</string>
|
||||
</dict>
|
||||
</plist>
|
@ -23,36 +23,39 @@ 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");
|
||||
opt = SCMenuItem(menu, "TextMate to front")
|
||||
.action_{
|
||||
"osascript << END
|
||||
tell application \"TextMate\" to activate
|
||||
END
|
||||
".unixCmd(postOutput: false)
|
||||
}
|
||||
.setShortCut("T");
|
||||
|
||||
openClassInTextMate = CocoaMenuItem(menu, 1, "Open class files in TextMate", false) { |item|
|
||||
item.state = item.state.not;
|
||||
this.saveState;
|
||||
};
|
||||
openClassInTextMate.state = settings.classfiles;
|
||||
SCMenuSeparator(menu);
|
||||
|
||||
openReferencesInTextMate = CocoaMenuItem(menu, 2, "Open references in TextMate", false) { |item|
|
||||
item.state = item.state.not;
|
||||
this.saveState;
|
||||
};
|
||||
openReferencesInTextMate.state = settings.references;
|
||||
openClassInTextMate = SCMenuItem(menu, "Open class files in TextMate")
|
||||
.action_{ |item|
|
||||
item.state = item.state.not;
|
||||
this.saveState;
|
||||
}
|
||||
.state_(settings.classfiles);
|
||||
|
||||
CocoaMenuItem(menu, 3, "About SuperCollider bundle", false) { |item|
|
||||
Document.new.string = "TextMate-SuperCollider bundle
|
||||
openReferencesInTextMate = SCMenuItem(menu, "Open references in TextMate")
|
||||
.action_{ |item|
|
||||
item.state = item.state.not;
|
||||
this.saveState;
|
||||
}
|
||||
.state_(settings.references);
|
||||
|
||||
by R.Watson
|
||||
SCMenuSeparator(menu, 4);
|
||||
|
||||
For documentation and source code,
|
||||
http://rfwatson.github.com"
|
||||
};
|
||||
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
|
||||
}
|
||||
@ -61,12 +64,20 @@ http://rfwatson.github.com"
|
||||
|
||||
// adapted from http://github.com/rfwatson/sc3ctrl
|
||||
SC3Controller {
|
||||
classvar nodes;
|
||||
classvar nodes, <>matePath;
|
||||
|
||||
*initClass {
|
||||
nodes = List[];
|
||||
|
||||
Platform.case(\osx) {
|
||||
|
||||
var whichMate = "which mate".unixCmdGetStdOut;
|
||||
if(whichMate.isEmpty){
|
||||
matePath = "/usr/local/bin/mate";
|
||||
} {
|
||||
matePath = whichMate;
|
||||
};
|
||||
|
||||
StartUp.add {
|
||||
this.addListeners;
|
||||
}
|
||||
@ -81,7 +92,7 @@ SC3Controller {
|
||||
};
|
||||
|
||||
if(nodes.isEmpty) {
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/cmd') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/cmd') { |t, r, msg|
|
||||
{
|
||||
thisThread.clock = SystemClock;
|
||||
msg[1].asString.interpretPrint;
|
||||
@ -90,14 +101,14 @@ SC3Controller {
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/help') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/help') { |t, r, msg|
|
||||
{
|
||||
msg[1].asString.openHelpFile;
|
||||
}.defer
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/class') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/class') { |t, r, msg|
|
||||
// TM version only
|
||||
var fname, cmd;
|
||||
var klass = msg[1].asString;
|
||||
@ -113,11 +124,14 @@ SC3Controller {
|
||||
var content = f.readAllString;
|
||||
var split = content.split($:);
|
||||
if("^[0-9]+$".matchRegexp(split.first.asString)) {
|
||||
("mate -l" ++ split.first + "\"" ++ fname ++ "\"").unixCmd(postOutput: false);
|
||||
(matePath ++ " -l"++ split.first + "\"" ++ fname ++ "\"").unixCmd(postOutput: false);
|
||||
} {
|
||||
("mate -l1 \"" ++ fname ++ "\"").unixCmd(postOutput: false);
|
||||
}
|
||||
(matePath ++ " -l1 \"" ++ fname ++ "\"").unixCmd(postOutput: false);
|
||||
};
|
||||
f.close;
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
} { // open in SC.app
|
||||
@ -127,7 +141,7 @@ SC3Controller {
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/implementations') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/implementations') { |t, r, msg|
|
||||
if(TextMate.openReferencesInTextMate.state) {
|
||||
{ this.methodTemplates(msg[1], true) }.defer
|
||||
} { // open in SC.app
|
||||
@ -136,7 +150,7 @@ SC3Controller {
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/references') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/references') { |t, r, msg|
|
||||
if(TextMate.openReferencesInTextMate.state) {
|
||||
{ this.methodReferences(msg[1], true) }.defer
|
||||
} { // open in SC.app
|
||||
@ -145,12 +159,12 @@ SC3Controller {
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/stop') { |t, r, msg|
|
||||
thisProcess.stop; nil;
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/clear') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/clear') { |t, r, msg|
|
||||
{
|
||||
Document.listener.string = ""; "";
|
||||
postToFront.();
|
||||
@ -158,12 +172,12 @@ SC3Controller {
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/postfront') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/postfront') { |t, r, msg|
|
||||
{ postToFront.() }.defer;
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/recompile') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/recompile') { |t, r, msg|
|
||||
{
|
||||
thisProcess.recompile;
|
||||
postToFront.();
|
||||
@ -220,7 +234,7 @@ SC3Controller {
|
||||
fname = "/tmp/" ++ Date.seed ++ ".sc";
|
||||
File.use(fname, "w") { |f|
|
||||
f << out.collection.asString;
|
||||
("mate" + fname).unixCmd(postOutput: false);
|
||||
(matePath + fname).unixCmd(postOutput: false);
|
||||
};
|
||||
} {
|
||||
out.collection.newTextWindow(name.asString);
|
||||
@ -243,7 +257,7 @@ SC3Controller {
|
||||
fname = "/tmp/" ++ Date.seed ++ ".sc";
|
||||
File.use(fname, "w") { |f|
|
||||
f << out.collection.asString;
|
||||
("mate" + fname).unixCmd(postOutput: false);
|
||||
(matePath + fname).unixCmd(postOutput: false);
|
||||
};
|
||||
} {
|
||||
out.collection.newTextWindow(name.asString);
|
||||
|
@ -21,38 +21,38 @@ SC3Controller {
|
||||
};
|
||||
|
||||
if(nodes.isEmpty) {
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/cmd') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/cmd') { |t, r, msg|
|
||||
msg[1].asString.interpretPrint;
|
||||
{ postToFront.() }.defer;
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/help') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/help') { |t, r, msg|
|
||||
{ msg[1].asString.openHelpFile }.defer
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/class') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/class') { |t, r, msg|
|
||||
{ msg[1].asString.interpret.openCodeFile }.defer
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/implementations') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/implementations') { |t, r, msg|
|
||||
{ SC3Controller.methodTemplates(msg[1]) }.defer
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/references') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/references') { |t, r, msg|
|
||||
{ SC3Controller.methodReferences(msg[1]) }.defer
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/stop') { |t, r, msg|
|
||||
thisProcess.stop;
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/clear') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/clear') { |t, r, msg|
|
||||
{
|
||||
Document.listener.string = ""; "";
|
||||
postToFront.();
|
||||
@ -60,12 +60,12 @@ SC3Controller {
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/postfront') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/postfront') { |t, r, msg|
|
||||
{ postToFront.() }.defer;
|
||||
}.add;
|
||||
nodes.add(node);
|
||||
|
||||
node = OSCresponderNode(nil, '/sc3ctrl/recompile') { |t, r, msg|
|
||||
node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/recompile') { |t, r, msg|
|
||||
{
|
||||
thisProcess.recompile;
|
||||
postToFront.();
|
||||
|
@ -11,7 +11,7 @@
|
||||
<key>foldingStopMarker</key>
|
||||
<string>\}|\*\/</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~@s</string>
|
||||
<string>^~S</string>
|
||||
<key>name</key>
|
||||
<string>SuperCollider</string>
|
||||
<key>patterns</key>
|
||||
|
22
info.plist
22
info.plist
@ -25,6 +25,7 @@
|
||||
<string>59AA6C90-F786-434B-B10E-DA608EFBC824</string>
|
||||
<string>89218E54-78ED-4C0B-92C9-8FEC7E3B2664</string>
|
||||
<string>8FA2A21C-E1C9-41AE-AEAB-7FF573747A7C</string>
|
||||
<string>7581E1DB-6946-44BB-B836-6F5CE5E99B55</string>
|
||||
<string>2635D12B-F4B6-45B6-8BA4-B50215737165</string>
|
||||
<string>FD6AB222-41B0-4851-AE06-D91F5422D7E1</string>
|
||||
<string>BA4AE872-4314-4D57-B2C6-6A66CCC5F55E</string>
|
||||
@ -38,6 +39,27 @@
|
||||
<string>293C4F9B-E1A4-4D01-83E7-0698112C7FA4</string>
|
||||
<string>3BAE7DE4-D06A-422B-94A3-7F542C47ED0F</string>
|
||||
<string>22917CBF-054E-49ED-8AFA-7B72C0CFFA3A</string>
|
||||
<string>A138C3A1-AEF7-4C4A-AD57-80B0564A61A8</string>
|
||||
<string>ABFD1872-DD86-4099-B758-28E319EF479D</string>
|
||||
<string>BB37ACE9-8262-4AF6-B3C6-43DC0AF2B370</string>
|
||||
<string>D36563CB-A0CE-43EB-8F19-2EF1D5E42B81</string>
|
||||
<string>43E979D3-9639-4DCC-9E57-24A5C72A30F1</string>
|
||||
<string>AB35A021-A800-4B82-B603-295CFD714A5B</string>
|
||||
<string>3FC8E89C-7BAF-4C66-9327-C544EBF53DFE</string>
|
||||
<string>93CDD123-97D9-40CB-9F63-A6F0A42D8622</string>
|
||||
<string>4C6C9C58-92F3-4FD2-AE39-00F01AC3F7B2</string>
|
||||
<string>D3FF72CE-4B17-47E2-8A3A-E2E4A6BAC859</string>
|
||||
<string>DF09CE07-5704-4932-8DC7-86A1ECE54401</string>
|
||||
<string>44331733-E717-4546-BA68-C254284E1089</string>
|
||||
<string>A2B8FE76-A086-4FD3-B832-7154B7CE88F4</string>
|
||||
<string>78E00F80-2133-42C8-94E8-C570693BEC8E</string>
|
||||
<string>533A6101-A0FB-4F3B-A94A-E04A8DC46C0F</string>
|
||||
<string>43EED273-EF78-473E-8BF0-650D2FC19CCA</string>
|
||||
<string>44E4E852-1518-4E8C-84F1-9990A1B910ED</string>
|
||||
<string>66B16E22-D3FB-464F-B820-2FEEFD79DBA5</string>
|
||||
<string>C94CF802-251A-44FE-87CB-4C50FA4D4D02</string>
|
||||
<string>36B59028-5F9E-4023-B0CB-46BA991E4A0F</string>
|
||||
<string>A29A295B-A0A4-4E8E-B144-802098C5D806</string>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>7613A472-3FAB-454C-8CF2-2E62F0D00920</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user