July 2007

erlang TextMate Bundle

I found this post containing a script that svn checkouts a fairly functional erlang TextMate bundle. Neat-o!

I edited the bundle to allow it to update itself, using a slightly modified form of the original script.

  • Bundles->Bundle Editor->Show Bundle Editor
  • Click on the menu entry text “erlang”
  • Drag a new separator to the bottom of the erlang bundle menu structure
  • Expand the erlang bundle menu
  • Use the drop-down + to create a new command
    • Save: Nothing
    • Command(s):

      Code (bash)
      1. #!/bin/bash
      2.          
      3. if [ -z "${TM_SVN}" ]; then
      4.   echo "You must define the location of your svn client in the variable TM_SVN."
      5.   exit 1
      6. fi
      7.  
      8. echo "Changing to Bundles directory…"
      9. mkdir -p /Library/Application\ Support/TextMate/Bundles
      10. cd /Library/Application\ Support/TextMate/Bundles
      11.  
      12. if [ -d /Library/Application\ Support/TextMate/Bundles/Erlang.tmbundle ]; then
      13.   echo Erlang bundle already exists - updating…
      14.   $TM_SVN up Erlang.tmbundle
      15. else
      16.   echo Checking out Erlang bundle…
      17.   $TM_SVN –username anon –password anon co http://macromates.com/svn/Bundles/trunk/Bundles/Erlang.tmbundle/
      18. fi
      19.  
      20. echo "Reloading bundles in TextMate…"
      21. osascript -e ‘tell app "TextMate" to reload bundles’
      22.  
      23. exit 0

      as downloadble file

    • Input: None
    • Output: Show as Tool Tip

Now you can update the bundle from it’s own menu option!

TextMate
erlang

Comments (1)

Permalink

erlang

I believe erlang is quickly becoming that “language I always should’ve learned” language — and all this time, I thought that language was LISP.

erlang
general

Comments (1)

Permalink