From f49e2fbb9ae7329696b044ca2ef317f3e5d71608 Mon Sep 17 00:00:00 2001 From: Arthur Carabott Date: Mon, 23 Mar 2009 18:16:03 +0000 Subject: [PATCH 1/2] Added new snippets, and printing command. --- Commands/print variable.tmCommand | 30 ++++++++++++++++++++++++++++++ Snippets/All Class Vars.tmSnippet | 16 ++++++++++++++++ Snippets/All Vars.tmSnippet | 16 ++++++++++++++++ Snippets/BugNumbers.tmSnippet | 19 +++++++++++++++++++ Snippets/While___.tmSnippet | 18 ++++++++++++++++++ Snippets/_get.tmSnippet | 16 ++++++++++++++++ Snippets/_set.tmSnippet | 16 ++++++++++++++++ Snippets/any ___.tmSnippet | 18 ++++++++++++++++++ Snippets/case copy.tmSnippet | 19 +++++++++++++++++++ Snippets/case.tmSnippet | 19 +++++++++++++++++++ Snippets/dumpAllMethods.tmSnippet | 16 ++++++++++++++++ Snippets/dumpInterface.tmSnippet | 16 ++++++++++++++++ Snippets/every ___.tmSnippet | 18 ++++++++++++++++++ Snippets/if ___ 2.tmSnippet | 18 ++++++++++++++++++ Snippets/if ___.tmSnippet | 2 +- Snippets/untitled 8.tmSnippet | 18 ++++++++++++++++++ Snippets/untitled.tmSnippet | 2 +- 17 files changed, 275 insertions(+), 2 deletions(-) create mode 100644 Commands/print variable.tmCommand create mode 100644 Snippets/All Class Vars.tmSnippet create mode 100644 Snippets/All Vars.tmSnippet create mode 100644 Snippets/BugNumbers.tmSnippet create mode 100644 Snippets/While___.tmSnippet create mode 100644 Snippets/_get.tmSnippet create mode 100644 Snippets/_set.tmSnippet create mode 100644 Snippets/any ___.tmSnippet create mode 100644 Snippets/case copy.tmSnippet create mode 100644 Snippets/case.tmSnippet create mode 100644 Snippets/dumpAllMethods.tmSnippet create mode 100644 Snippets/dumpInterface.tmSnippet create mode 100644 Snippets/every ___.tmSnippet create mode 100644 Snippets/if ___ 2.tmSnippet create mode 100644 Snippets/untitled 8.tmSnippet diff --git a/Commands/print variable.tmCommand b/Commands/print variable.tmCommand new file mode 100644 index 0000000..b27c595 --- /dev/null +++ b/Commands/print variable.tmCommand @@ -0,0 +1,30 @@ + + + + + beforeRunningCommand + nop + command + #!/usr/bin/env ruby + +word = ENV['TM_CURRENT_WORD'] +if !word.nil? and word.size > 0 + puts %Q{"#{word}: ".post; #{word}.postln;}end + fallbackInput + word + input + selection + keyEquivalent + ~@p + name + print variable + output + replaceSelectedText + scope + source.supercollider + tabTrigger + parv + uuid + 22BB21A0-D2B7-4540-B1DE-02556BE6F8A7 + + diff --git a/Snippets/All Class Vars.tmSnippet b/Snippets/All Class Vars.tmSnippet new file mode 100644 index 0000000..26ec1fd --- /dev/null +++ b/Snippets/All Class Vars.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .classVarNames.dump; + name + All Class Vars + scope + source.supercollider + tabTrigger + .acvars + uuid + 3FC8E89C-7BAF-4C66-9327-C544EBF53DFE + + diff --git a/Snippets/All Vars.tmSnippet b/Snippets/All Vars.tmSnippet new file mode 100644 index 0000000..fb10342 --- /dev/null +++ b/Snippets/All Vars.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .instVarNames.dump; + name + All Vars + scope + source.supercollider + tabTrigger + .avars + uuid + 93CDD123-97D9-40CB-9F63-A6F0A42D8622 + + diff --git a/Snippets/BugNumbers.tmSnippet b/Snippets/BugNumbers.tmSnippet new file mode 100644 index 0000000..ec6519f --- /dev/null +++ b/Snippets/BugNumbers.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + // +$1.postln; +// + + name + BugNumbers + scope + source.supercollider + tabTrigger + n. + uuid + 4C6C9C58-92F3-4FD2-AE39-00F01AC3F7B2 + + diff --git a/Snippets/While___.tmSnippet b/Snippets/While___.tmSnippet new file mode 100644 index 0000000..a642ac2 --- /dev/null +++ b/Snippets/While___.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + while({${1:condition}}, { + ${2:do} +}); + name + While... + scope + source.supercollider + tabTrigger + while + uuid + D3FF72CE-4B17-47E2-8A3A-E2E4A6BAC859 + + diff --git a/Snippets/_get.tmSnippet b/Snippets/_get.tmSnippet new file mode 100644 index 0000000..5e9d1df --- /dev/null +++ b/Snippets/_get.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .get(${1:0}, {|msg| ${2:msg.postln}}); + name + .get + scope + source.supercollider + tabTrigger + .get + uuid + 43E979D3-9639-4DCC-9E57-24A5C72A30F1 + + diff --git a/Snippets/_set.tmSnippet b/Snippets/_set.tmSnippet new file mode 100644 index 0000000..d717e3d --- /dev/null +++ b/Snippets/_set.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .set(\\${1:arg}, ${2:val}); + name + .set + scope + source.supercollider + tabTrigger + .set + uuid + AB35A021-A800-4B82-B603-295CFD714A5B + + diff --git a/Snippets/any ___.tmSnippet b/Snippets/any ___.tmSnippet new file mode 100644 index 0000000..5ec1d5e --- /dev/null +++ b/Snippets/any ___.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + any { |item, i| + $1 +}; + name + any ... + scope + source.supercollider + tabTrigger + any + uuid + DF09CE07-5704-4932-8DC7-86A1ECE54401 + + diff --git a/Snippets/case copy.tmSnippet b/Snippets/case copy.tmSnippet new file mode 100644 index 0000000..0fd3edd --- /dev/null +++ b/Snippets/case copy.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + switch ($1) + {$2} {$3} + {$4} {$5}; + + name + case copy + scope + source.supercollider + tabTrigger + switch + uuid + A2B8FE76-A086-4FD3-B832-7154B7CE88F4 + + diff --git a/Snippets/case.tmSnippet b/Snippets/case.tmSnippet new file mode 100644 index 0000000..a76c749 --- /dev/null +++ b/Snippets/case.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + case + {$1} {$2} + {$3} {$4}; + + name + case + scope + source.supercollider + tabTrigger + case + uuid + 44331733-E717-4546-BA68-C254284E1089 + + diff --git a/Snippets/dumpAllMethods.tmSnippet b/Snippets/dumpAllMethods.tmSnippet new file mode 100644 index 0000000..fd2b741 --- /dev/null +++ b/Snippets/dumpAllMethods.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .dumpAllMethods; + name + dumpAllMethods + scope + source.supercollider + tabTrigger + .dm + uuid + 78E00F80-2133-42C8-94E8-C570693BEC8E + + diff --git a/Snippets/dumpInterface.tmSnippet b/Snippets/dumpInterface.tmSnippet new file mode 100644 index 0000000..1bc7978 --- /dev/null +++ b/Snippets/dumpInterface.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + .dumpInterface; + name + dumpInterface + scope + source.supercollider + tabTrigger + .di + uuid + 533A6101-A0FB-4F3B-A94A-E04A8DC46C0F + + diff --git a/Snippets/every ___.tmSnippet b/Snippets/every ___.tmSnippet new file mode 100644 index 0000000..b01244a --- /dev/null +++ b/Snippets/every ___.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + every { |item, i| + $1 +}; + name + every ... + scope + source.supercollider + tabTrigger + every + uuid + 43EED273-EF78-473E-8BF0-650D2FC19CCA + + diff --git a/Snippets/if ___ 2.tmSnippet b/Snippets/if ___ 2.tmSnippet new file mode 100644 index 0000000..0875544 --- /dev/null +++ b/Snippets/if ___ 2.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + if(${1:condition}) { + ${2:true} +}; + name + if ... + scope + source.supercollider + tabTrigger + if + uuid + 44E4E852-1518-4E8C-84F1-9990A1B910ED + + diff --git a/Snippets/if ___.tmSnippet b/Snippets/if ___.tmSnippet index 4c7198c..a51866e 100644 --- a/Snippets/if ___.tmSnippet +++ b/Snippets/if ___.tmSnippet @@ -13,7 +13,7 @@ scope source.supercollider tabTrigger - if + ife uuid C0F1C9B0-6393-4B2B-86B4-40010363DCDE diff --git a/Snippets/untitled 8.tmSnippet b/Snippets/untitled 8.tmSnippet new file mode 100644 index 0000000..87e6643 --- /dev/null +++ b/Snippets/untitled 8.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + .makeBundle(${1:0.2}, { + $2 +}); + name + makeBundle + scope + source.supercollider + tabTrigger + .mb + uuid + 66B16E22-D3FB-464F-B820-2FEEFD79DBA5 + + diff --git a/Snippets/untitled.tmSnippet b/Snippets/untitled.tmSnippet index be28fb6..3030f91 100644 --- a/Snippets/untitled.tmSnippet +++ b/Snippets/untitled.tmSnippet @@ -3,7 +3,7 @@ content - .postln + .postln; name .postln scope From a6a09d97a90820580a63f369e75a00e00db0de72 Mon Sep 17 00:00:00 2001 From: Arthur Carabott Date: Thu, 16 Apr 2009 09:41:38 +0100 Subject: [PATCH 2/2] Replaced Print Variable command with a Print Variable snippet using << syntax; now works with array indexes etc. --- Commands/print variable.tmCommand | 30 ------------------------------ info.plist | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 30 deletions(-) delete mode 100644 Commands/print variable.tmCommand diff --git a/Commands/print variable.tmCommand b/Commands/print variable.tmCommand deleted file mode 100644 index b27c595..0000000 --- a/Commands/print variable.tmCommand +++ /dev/null @@ -1,30 +0,0 @@ - - - - - beforeRunningCommand - nop - command - #!/usr/bin/env ruby - -word = ENV['TM_CURRENT_WORD'] -if !word.nil? and word.size > 0 - puts %Q{"#{word}: ".post; #{word}.postln;}end - fallbackInput - word - input - selection - keyEquivalent - ~@p - name - print variable - output - replaceSelectedText - scope - source.supercollider - tabTrigger - parv - uuid - 22BB21A0-D2B7-4540-B1DE-02556BE6F8A7 - - diff --git a/info.plist b/info.plist index 114942f..ee05db5 100644 --- a/info.plist +++ b/info.plist @@ -42,6 +42,21 @@ ABFD1872-DD86-4099-B758-28E319EF479D BB37ACE9-8262-4AF6-B3C6-43DC0AF2B370 D36563CB-A0CE-43EB-8F19-2EF1D5E42B81 + 43E979D3-9639-4DCC-9E57-24A5C72A30F1 + AB35A021-A800-4B82-B603-295CFD714A5B + 3FC8E89C-7BAF-4C66-9327-C544EBF53DFE + 93CDD123-97D9-40CB-9F63-A6F0A42D8622 + 4C6C9C58-92F3-4FD2-AE39-00F01AC3F7B2 + D3FF72CE-4B17-47E2-8A3A-E2E4A6BAC859 + DF09CE07-5704-4932-8DC7-86A1ECE54401 + 44331733-E717-4546-BA68-C254284E1089 + A2B8FE76-A086-4FD3-B832-7154B7CE88F4 + 78E00F80-2133-42C8-94E8-C570693BEC8E + 533A6101-A0FB-4F3B-A94A-E04A8DC46C0F + 43EED273-EF78-473E-8BF0-650D2FC19CCA + 44E4E852-1518-4E8C-84F1-9990A1B910ED + 66B16E22-D3FB-464F-B820-2FEEFD79DBA5 + C94CF802-251A-44FE-87CB-4C50FA4D4D02 uuid 7613A472-3FAB-454C-8CF2-2E62F0D00920