Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Run in SWIProlog command.

  • Loading branch information...
commit 9a14106b407bede8acf546d57d95d1803d867d68 1 parent 6406b48
@nirth nirth authored infininight committed
Showing with 45 additions and 0 deletions.
  1. +43 −0 Commands/Run SWIProlog.tmCommand
  2. +2 −0  info.plist
View
43 Commands/Run SWIProlog.tmCommand
@@ -0,0 +1,43 @@
+<?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>#!/bin/bash
+
+TPROLOG=${TM_PROLOG:-swipl}
+
+osascript &lt;&lt;- APPLESCRIPT
+tell application "Terminal"
+ launch
+ activate
+ do script do script "clear; cd \"${TM_DIRECTORY}\"; ${TPROLOG} -f \"${TM_FILEPATH}\""
+ set position of first window to {100, 100}
+end tell
+APPLESCRIPT</string>
+ <key>input</key>
+ <string>none</string>
+ <key>inputFormat</key>
+ <string>text</string>
+ <key>keyEquivalent</key>
+ <string>@r</string>
+ <key>name</key>
+ <string>Run in SWIProlog</string>
+ <key>outputCaret</key>
+ <string>afterOutput</string>
+ <key>outputFormat</key>
+ <string>text</string>
+ <key>outputLocation</key>
+ <string>discard</string>
+ <key>scope</key>
+ <string>source.prolog</string>
+ <key>semanticClass</key>
+ <string>process.run.prolog</string>
+ <key>uuid</key>
+ <string>9206350F-2E58-4339-BF2E-0FF730B11B4B</string>
+ <key>version</key>
+ <integer>2</integer>
+</dict>
+</plist>
View
2  info.plist
@@ -13,6 +13,7 @@
<key>items</key>
<array>
<string>38D17DB7-C0D3-4C05-BD10-A7F78D67DF03</string>
+ <string>9206350F-2E58-4339-BF2E-0FF730B11B4B</string>
<string>------------------------------------</string>
<string>098C68B8-3CA3-4FDA-B56C-1B05E39DB60F</string>
<string>E5A401DA-D74A-4F41-AA4C-AA2FDF7A13C3</string>
@@ -28,6 +29,7 @@
<array>
<string>C0E2ADB0-1706-4A28-8DB7-263BDC8B5C5C</string>
<string>38D17DB7-C0D3-4C05-BD10-A7F78D67DF03</string>
+ <string>9206350F-2E58-4339-BF2E-0FF730B11B4B</string>
<string>098C68B8-3CA3-4FDA-B56C-1B05E39DB60F</string>
<string>E5A401DA-D74A-4F41-AA4C-AA2FDF7A13C3</string>
<string>8424158B-AD81-40F3-BCFD-B0D8FB1ED80D</string>
Please sign in to comment.
Something went wrong with that request. Please try again.