Skip to content
Browse files

• add a run command for fpc — this is from Taras Barton (RBarton on I…

…RC) and untested by me.

git-svn-id: http://svn.textmate.org/trunk/Bundles/Pascal.tmbundle@8303 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 271532a commit 706bb695500ae23411fb14b4f3de2de1de100e0f @sorbits sorbits committed Oct 17, 2007
Showing with 38 additions and 1 deletion.
  1. +35 −0 Commands/Run.tmCommand
  2. +3 −1 info.plist
View
35 Commands/Run.tmCommand
@@ -0,0 +1,35 @@
+<?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>saveActiveFile</string>
+ <key>command</key>
+ <string>require_cmd fpc 'The Free Pascal Compiler is available from &lt;a href="http://www.freepascal.org/"&gt;http://www.freepascal.org/&lt;/a&gt;'
+
+cd "$TM_DIRECTORY"
+fpc "$TM_FILENAME"
+if [[ $? == 0 ]]; then
+ SCRIPT="TM_DIRECTORY=$TM_DIRECTORY"$'\nTM_FILENAME='"$TM_FILENAME"$'\ncd "$TM_DIRECTORY" &amp;&amp; clear &amp;&amp; "./${TM_FILENAME%.*}" &amp;&amp; exit'
+ osascript &lt;&lt;APPLESCRIPT
+ tell app "Terminal"
+ activate
+ do script "${SCRIPT//\"/\"}"
+ end tell
+APPLESCRIPT
+fi
+</string>
+ <key>input</key>
+ <string>none</string>
+ <key>keyEquivalent</key>
+ <string>@r</string>
+ <key>name</key>
+ <string>Run</string>
+ <key>output</key>
+ <string>showAsHTML</string>
+ <key>scope</key>
+ <string>source.pascal</string>
+ <key>uuid</key>
+ <string>8E597879-2721-424B-B4F5-974259B67697</string>
+</dict>
+</plist>
View
4 info.plist
@@ -1,5 +1,5 @@
<?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>contactEmailRot13</key>
@@ -16,6 +16,8 @@
</array>
<key>items</key>
<array>
+ <string>8E597879-2721-424B-B4F5-974259B67697</string>
+ <string>------------------------------------</string>
<string>8B351BE6-14CC-4C00-85ED-F307942A027F</string>
<string>4FA629B0-2CD2-4833-9C9E-F44EE762A997</string>
<string>------------------------------------</string>

0 comments on commit 706bb69

Please sign in to comment.
Something went wrong with that request. Please try again.