Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add initial semantic classes.

  • Loading branch information...
commit f52c2a036b74ae80b17630c50cc4212e3b3d4a5c 1 parent dc602cd
@infininight infininight authored
Showing with 29 additions and 6 deletions.
  1. +17 −4 Commands/Perldoc on Word.plist
  2. +12 −2 Commands/Run Script (plain).plist
View
21 Commands/Perldoc on Word.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>word=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}
+ <string>#!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+word=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}
(perldoc -u "$word" 2&gt;/dev/null || perldoc -u -f "$word" 2&gt;/dev/null) | pod2html --q --title "Perl Documentation - $word" 2&gt;/dev/null | sed -E 's|&lt;a href="#(item_)?([^"]+)"&gt;|&lt;a href="http://perldoc.perl.org/search.html?q=\2"&gt;|g'
if [[ -e "${TM_DIRECTORY}/pod2htmd.tmp" ]]
then unlink "${TM_DIRECTORY}/pod2htmd.tmp"
@@ -17,15 +20,25 @@ fi</string>
<string>word</string>
<key>input</key>
<string>selection</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>^h</string>
<key>name</key>
<string>Documentation for Word / Selection</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>scope</key>
<string>source.perl</string>
+ <key>semanticClass</key>
+ <string>lookup.define.perl</string>
<key>uuid</key>
<string>DA0A5D89-5F16-11D9-B9C3-000D93589AF6</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
View
14 Commands/Run Script (plain).plist
@@ -18,15 +18,25 @@ TextMate::Executor.run(ENV["TM_PERL"] || "perl", "-I#{ENV["TM_BUNDLE_SUPPORT"]}"
</string>
<key>input</key>
<string>document</string>
+ <key>inputFormat</key>
+ <string>text</string>
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
<string>Run Script</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>scope</key>
<string>source.perl</string>
+ <key>semanticClass</key>
+ <string>process.run.script.perl</string>
<key>uuid</key>
<string>2F3DB2EF-6B9E-4E5F-87A8-3675680E5C0D</string>
+ <key>version</key>
+ <integer>2</integer>
</dict>
</plist>
Please sign in to comment.
Something went wrong with that request. Please try again.