Goals for Erlang Builder:
- Compile all Erlang sources in same dir as saved file
- Show HTML output of errors and warnings if any is provided
- Link HTML output to lines in Erlang source files
- Generate BEAM files in $TM_PROJECT_DIRECTORY/ebin
- Set ERLANG_HOME in Preferences>Advanced>Shell Variables
- Get/Update the Erlang bundle:
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles/
svn co http://macromates.com/svn/Bundles/trunk/Bundles/Erlang.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'
- Grab Warning/Error icons for the Erlang bundle from the ADC Reference Library:
cd ~/Library/Application\ Support/TextMate/Bundles/Erlang.tmbundle/
mkdir Resources
cd Resources
srcdir="/Developer/Documentation/DocSets"
srcdir="$srcdir/com.apple.ADC_Reference_Library.DeveloperTools.docset"
srcdir="$srcdir/Contents/Resources/Documents/documentation"
srcdir="$srcdir/DeveloperTools/Conceptual/iSyncPluginMakerUserGuide/art"
for icon in tr_warn_error.jpg tr_warn_alert.jpg
do cp $srcdir/$icon .
done
- Create a Command called Compile in the Erlang bundle
- Set Save to 'Current File'
- Paste the following Ruby script into Command(s):
- Set Input to 'None'
- Set Output to 'Discard'
- Set Activation to 'Key Equivalent' and type Command-S in the key-binding field
- Set Scope to 'source.erlang'
- Save an Erlang source file with a deliberate error and see the output
- Post your feedback as a comment
You now have an immediate indication of errors each time you save. If no compile errors or warnings are present no output will be shown.
If you have commit access to the TextMate Bundle Repository, please commit this change.
4 comments:
Starting to play around with Erlang ( Hello World on Steroids ) and new to TextMate I certainly appreciate your posts on Erlang development in TextMate. Keep up the good work!
Thank you very much for your kind remarks Ruben. I am glad that my posts have been interesting and useful for you.
This is certainly a major missing cmd from the bundle - thanks!
for anyone else who is having trouble viewing the contents of the iframe.... I found the script in google's cache
I cannot get the ruby script, neither on this site nor in the google's cache :-(
Post a Comment