Skip to content

Commit

Permalink
Add preview command
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Gallagher committed Aug 8, 2011
1 parent ebc6fd0 commit a51beb5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
24 changes: 24 additions & 0 deletions Commands/Preview.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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>#!/usr/bin/env sh
jade
</string>
<key>input</key>
<string>document</string>
<key>keyEquivalent</key>
<string>^~@p</string>
<key>name</key>
<string>Preview</string>
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
<string>source.jade</string>
<key>uuid</key>
<string>FF542D1A-4247-4240-8348-DB30EB477256</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,22 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/bin/bash
echo "&lt;pre style='font-family:Menlo; font-size: 22px;'&gt;"
<string>#!/usr/bin/env sh
echo "&lt;pre style='font-family:Menlo; font-size: 12px; word-wrap: break-word;'&gt;"
jade | sed 's/&lt;/\&amp;lt;/g' | sed 's/&gt;/\&amp;gt;/g'
echo "&lt;/pre&gt;"</string>
<key>fallbackInput</key>
<string>document</string>
echo "&lt;/pre&gt;"
</string>
<key>input</key>
<string>selection</string>
<string>document</string>
<key>keyEquivalent</key>
<string>@b</string>
<key>name</key>
<string>Compile and Display Jade</string>
<string>Render</string>
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
<string>source.jade</string>
<key>uuid</key>
<string>AEEEF338-EF0F-4276-BB8A-648B09F4A79E</string>
<string>4E2866A2-7FAE-4980-84E1-0E8AAB7C36FB</string>
</dict>
</plist>
3 changes: 2 additions & 1 deletion info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<array>
<string>C5B73B98-5F2A-42E3-9F0E-028A74A9FE4B</string>
<string>45F19BDD-2A4D-4848-83D5-E5F1A7FF4726</string>
<string>AEEEF338-EF0F-4276-BB8A-648B09F4A79E</string>
<string>4E2866A2-7FAE-4980-84E1-0E8AAB7C36FB</string>
<string>FF542D1A-4247-4240-8348-DB30EB477256</string>
</array>
<key>uuid</key>
<string>93D6D9C3-67F2-4C06-B3B3-BF872579B44F</string>
Expand Down

0 comments on commit a51beb5

Please sign in to comment.