Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile-and-save command #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Commands/Compile and Display JS.tmCommand
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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">
<?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">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
Expand Down
28 changes: 28 additions & 0 deletions Commands/Compile and Save.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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">
<plist version="1.0">
<dict>
<key>name</key>
<string>Compile and Save</string>
<key>uuid</key>
<string>2000D73F-02FB-4EF9-895E-02AFD1FE78B9</string>
<key>input</key>
<string>none</string>
<key>output</key>
<string>showAsTooltip</string>
<key>command</key>
<string>#!/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
newfile=`echo ${TM_FILEPATH} | sed "s/\.coffee$/.js/"`
${TM_COFFEE:=coffee} -cp --bare ${TM_FILEPATH} &gt; $newfile
echo Coffe `${TM_COFFEE:=coffee} -v`
echo Coffee: "${TM_FILEPATH}"
echo Compiled to: $newfile</string>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>scope</key>
<string>source.coffee</string>
<key>keyEquivalent</key>
<string>@^$s</string>
</dict>
</plist>
4 changes: 3 additions & 1 deletion Commands/Run selected text.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<string>nop</string>
<key>command</key>
<string>#!/bin/bash

PATH=/usr/local/bin:/usr/bin:/bin:$PATH
echo '<pre>'
${TM_COFFEE:=coffee} -s
echo '</pre>'
</string>
<key>input</key>
<string>selection</string>
Expand Down
6 changes: 4 additions & 2 deletions Commands/Run.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<string>nop</string>
<key>command</key>
<string>#!/bin/bash

${TM_COFFEE:=coffee} -s | pre</string>
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
echo '<pre>'
${TM_COFFEE:=coffee} -s
echo '</pre>'</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
Expand Down