Permalink
Browse files

Add initial semantic classes.

  • Loading branch information...
1 parent 77ea489 commit d358133faf97448dd4d9aad2e93fdc3560c91f73 @infininight infininight committed Sep 8, 2012
@@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>file=$(osascript &lt;&lt;"APPLESCRIPT"
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+file=$(osascript &lt;&lt;"APPLESCRIPT"
tell app "TextMate"
try
set theFile to choose file
@@ -24,13 +27,23 @@ fi
</string>
<key>input</key>
<string>document</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Document With Arbitrary File…</string>
- <key>output</key>
- <string>openAsNewDocument</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>newWindow</string>
+ <key>semanticClass</key>
+ <string>diff.document</string>
<key>uuid</key>
<string>4050A252-C604-4D0C-8545-E50B22E2715B</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>export PATCH_GET=0
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+export PATCH_GET=0
export __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100
if [[ -z $TM_FILEPATH ]]
@@ -20,13 +23,23 @@ rescan_project
<string>none</string>
<key>input</key>
<string>selection</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Apply Patch From Clipboard to Current Document</string>
- <key>output</key>
- <string>showAsTooltip</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>toolTip</string>
+ <key>semanticClass</key>
+ <string>diff.files</string>
<key>uuid</key>
<string>46842464-574C-477F-9DFB-BB38EA3C85BE</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string># patch may be the most brainfucked standard Unix tool ever. Make sure it doesn't try to access the network (it tends to ignore the -g option, I find) -- if you have Perforce installed, this can be a huge performance hit -- and it touches the network even for files that aren't controlled by Perforce. All files on the system get the lovely 'is this file locked'? treatment. Software tools, huh?
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+# patch may be the most brainfucked standard Unix tool ever. Make sure it doesn't try to access the network (it tends to ignore the -g option, I find) -- if you have Perforce installed, this can be a huge performance hit -- and it touches the network even for files that aren't controlled by Perforce. All files on the system get the lovely 'is this file locked'? treatment. Software tools, huh?
export PATCH_GET=0
@@ -24,13 +27,23 @@ fi
</string>
<key>input</key>
<string>document</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Apply Patch to Files…</string>
- <key>output</key>
- <string>showAsTooltip</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>toolTip</string>
+ <key>semanticClass</key>
+ <string>diff.files</string>
<key>uuid</key>
<string>54D1CEF2-10AB-407B-AAB2-6AEA06B297B1</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string># set defaultCStringEncoding to UTF-8
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+# set defaultCStringEncoding to UTF-8
if diff --strip-trailing-cr --label "${TM_FILENAME:-untitled}" --label "(clipboard)" -u - &lt;(__CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbpaste); then
echo "There are no differences."
else
@@ -14,13 +17,23 @@ fi
</string>
<key>input</key>
<string>selection</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Document / Selection With Clipboard</string>
- <key>output</key>
- <string>showAsTooltip</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>toolTip</string>
+ <key>semanticClass</key>
+ <string>diff.document</string>
<key>uuid</key>
<string>674E54F5-065E-4224-9626-673903B7C0E0</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>eval arr=("$TM_SELECTED_FILES")
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+eval arr=("$TM_SELECTED_FILES")
if [[ ${#arr[@]} != 2 ]]; then
exit_show_tool_tip $'You need to select exactly two\nfiles in the project drawer.'
fi
@@ -16,13 +19,23 @@ fi
</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Selected Files in Project Drawer</string>
- <key>output</key>
- <string>openAsNewDocument</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>newWindow</string>
+ <key>semanticClass</key>
+ <string>diff.files</string>
<key>uuid</key>
<string>D04AFBD3-8110-11D9-8E5B-0011242E4184</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>eval arr=("$TM_SELECTED_FILES")
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+eval arr=("$TM_SELECTED_FILES")
if [[ ${#arr[@]} != 2 ]]; then
echo -e "You need to select exactly two files in the project drawer."
exit_show_tool_tip
@@ -15,13 +18,23 @@ perl "$TM_BUNDLE_SUPPORT/Diff.pl"
</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Selected Files in Project Drawer (HTML)</string>
- <key>output</key>
- <string>showAsHTML</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>html</string>
+ <key>outputLocation</key>
+ <string>newWindow</string>
+ <key>semanticClass</key>
+ <string>diff.files</string>
<key>uuid</key>
<string>6A811265-81DC-11D9-9AA2-000D9332809C</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>if [[ ! -e "$TM_FILEPATH" ]]; then
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+if [[ ! -e "$TM_FILEPATH" ]]; then
exit_show_tool_tip "There is no file on disk"
fi
@@ -15,13 +18,23 @@ fi
</string>
<key>input</key>
<string>document</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Document With Saved Copy</string>
- <key>output</key>
- <string>openAsNewDocument</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>newWindow</string>
+ <key>semanticClass</key>
+ <string>diff.document</string>
<key>uuid</key>
<string>0979659D-126E-467F-AC07-599979A42D67</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>require_cmd opendiff "Opendiff comes with Apple's developer tools."
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+require_cmd opendiff "Opendiff comes with Apple's developer tools."
# set utf-8 as the default encoding (used by opendiff)
export __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100
@@ -18,13 +21,23 @@ fi
</string>
<key>input</key>
<string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^@D</string>
<key>name</key>
<string>Merge Selected Files…</string>
- <key>output</key>
- <string>showAsTooltip</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>toolTip</string>
+ <key>semanticClass</key>
+ <string>diff.files</string>
<key>uuid</key>
<string>239E196A-7106-4DC9-8FAE-0A9CA7540AFA</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
@@ -1,25 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>egrep -v '^(\+\+\+|---) '|\
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+egrep -v '^(\+\+\+|---) '|\
tee &gt;(add=$(grep ^+|wc -l); echo 1&gt;&amp;2 "Lines Added $add") \
|{ rem=$(grep ^-|wc -l); wait; echo "Lines Removed $rem"; }
</string>
<key>input</key>
<string>document</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^N</string>
<key>name</key>
<string>Statistics (Lines Added/Removed)</string>
- <key>output</key>
- <string>showAsTooltip</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>toolTip</string>
<key>scope</key>
<string>source.diff</string>
+ <key>semanticClass</key>
+ <string>diff.document</string>
<key>uuid</key>
<string>B9091553-4317-415E-B381-4609BD453E01</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>

0 comments on commit d358133

Please sign in to comment.