Skip to content

Commit

Permalink
added rudimentary 'documentation for word' command as well as a simpl…
Browse files Browse the repository at this point in the history
…e 'execute line/selection as Nu' command
  • Loading branch information
Jason Sallis committed Nov 2, 2008
1 parent 0a36082 commit 6dd87bb
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Commands/Documentation For Word.tmCommand
@@ -0,0 +1,29 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>require_cmd "${TM_NUSH:=nush}" "If you have installed Nu, then you need to either update your &lt;tt&gt;PATH&lt;/tt&gt; or set the &lt;tt&gt;TM_NUSH&lt;/tt&gt; shell variable (e.g. in Preferences / Advanced)"
read s
$TM_NUSH -e "(puts (help $s))"
</string>
<key>fallbackInput</key>
<string>word</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>^h</string>
<key>name</key>
<string>Documentation For Word</string>
<key>output</key>
<string>showAsTooltip</string>
<key>scope</key>
<string>source.nu</string>
<key>uuid</key>
<string>E47C06ED-A947-4ACF-A386-772F411FE216</string>
</dict>
</plist>
28 changes: 28 additions & 0 deletions Commands/Execute Line : Selection as Nu.tmCommand
@@ -0,0 +1,28 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>require_cmd "${TM_NUSH:=nush}" "If you have installed Nu, then you need to either update your &lt;tt&gt;PATH&lt;/tt&gt; or set the &lt;tt&gt;TM_NUSH&lt;/tt&gt; shell variable (e.g. in Preferences / Advanced)"
read s
$TM_NUSH -e "$s"
</string>
<key>fallbackInput</key>
<string>line</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>^E</string>
<key>name</key>
<string>Execute Line / Selection as Nu</string>
<key>output</key>
<string>afterSelectedText</string>
<key>scope</key>
<string>source.nu</string>
<key>uuid</key>
<string>5092D366-FCA7-4EAF-88B9-B6DDCA942938</string>
</dict>
</plist>
5 changes: 5 additions & 0 deletions info.plist
Expand Up @@ -27,7 +27,10 @@
<array>
<string>82E4152A-57BA-476F-9FC1-83920DFE2ADD</string>
<string>CD9FF10E-B2AD-446C-8580-B050643473CF</string>
<string>5092D366-FCA7-4EAF-88B9-B6DDCA942938</string>
<string>------------------------------------</string>
<string>D3B3174B-C30D-499A-95E1-62B1C541AD72</string>
<string>E47C06ED-A947-4ACF-A386-772F411FE216</string>
<string>------------------------------------</string>
<string>90AB0ABE-C752-4431-9FDC-1BA75B3CF148</string>
<string>1299B1E4-EE4F-45CD-B04F-9A3C7A592A91</string>
Expand Down Expand Up @@ -249,6 +252,8 @@
<string>EAA5B245-8BC3-4D47-8B3D-FFF6D9C81AFA</string>
<string>82E4152A-57BA-476F-9FC1-83920DFE2ADD</string>
<string>CD9FF10E-B2AD-446C-8580-B050643473CF</string>
<string>5092D366-FCA7-4EAF-88B9-B6DDCA942938</string>
<string>E47C06ED-A947-4ACF-A386-772F411FE216</string>
<string>D3B3174B-C30D-499A-95E1-62B1C541AD72</string>
<string>E63988FF-4701-4B7B-8877-43621D8AB749</string>
<string>D1E8EEBD-939D-498B-8B68-966C734AA65B</string>
Expand Down

0 comments on commit 6dd87bb

Please sign in to comment.