From 067f4cb869d929535858a1fa6a6b2cc07c870921 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Sat, 17 Jan 2009 14:13:09 +0000 Subject: [PATCH] some tweaks --- .../Snippets/Char_nl.tmSnippet | 16 +++++++ .../Syntaxes/SuperCollider.tmLanguage | 2 +- SuperCollider.tmbundle/info.plist | 1 + TextMate.sc | 42 ++++++++++--------- 4 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 SuperCollider.tmbundle/Snippets/Char_nl.tmSnippet diff --git a/SuperCollider.tmbundle/Snippets/Char_nl.tmSnippet b/SuperCollider.tmbundle/Snippets/Char_nl.tmSnippet new file mode 100644 index 0000000..29dc828 --- /dev/null +++ b/SuperCollider.tmbundle/Snippets/Char_nl.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + Char.nl + name + Char.nl + scope + source.supercollider + tabTrigger + nl + uuid + 61169F07-1581-4355-8143-3EEF6F672E58 + + diff --git a/SuperCollider.tmbundle/Syntaxes/SuperCollider.tmLanguage b/SuperCollider.tmbundle/Syntaxes/SuperCollider.tmLanguage index fceda41..c61a1ce 100644 --- a/SuperCollider.tmbundle/Syntaxes/SuperCollider.tmLanguage +++ b/SuperCollider.tmbundle/Syntaxes/SuperCollider.tmLanguage @@ -88,7 +88,7 @@ match - \|[a-zA-Z0-9\#\[\]\_\=\.\(\)[[:space:]]\,]+\| + \|[a-zA-Z0-9\#\[\]\"\_\=\.\(\)[[:space:]]\,]+\| name variable.parameter.function.supercollider diff --git a/SuperCollider.tmbundle/info.plist b/SuperCollider.tmbundle/info.plist index 9d608cf..2bfc0e9 100644 --- a/SuperCollider.tmbundle/info.plist +++ b/SuperCollider.tmbundle/info.plist @@ -8,6 +8,7 @@ F63E530D-4C84-4C66-9EAA-6FC504FA4587 2C468C9B-66BB-40C6-B845-E2360D4717B4 + 61169F07-1581-4355-8143-3EEF6F672E58 EEDC65AF-1F53-4E2F-AA08-D1E04FAC5B1D F70E5246-BA0F-4201-8C63-09D8CE38A690 C56D8EA0-215E-438C-B039-23830645FFDA diff --git a/TextMate.sc b/TextMate.sc index 6863fb8..b7d7c8e 100755 --- a/TextMate.sc +++ b/TextMate.sc @@ -3,26 +3,30 @@ TextMate { *initClass { var opt; - - menu = CocoaMenuItem(nil, 7, "TextMate", true); - - 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; - }; - openClassInTextMate.state = true; - openReferencesInTextMate = CocoaMenuItem(menu, 2, "Open references in TextMate", false) { |item| - item.state = item.state.not; - }; - openReferencesInTextMate.state = true; + try { + menu = CocoaMenuItem(nil, 7, "TextMate", true); + + 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; + }; + openClassInTextMate.state = true; + + openReferencesInTextMate = CocoaMenuItem(menu, 2, "Open references in TextMate", false) { |item| + item.state = item.state.not; + }; + openReferencesInTextMate.state = true; + } { + "TextMate found a problem installing CocoaMenuItems - you may be running SC 3.2 or older, or booting from command-line.".warn + } } }