Tweaking TextMate Groovy Bundle - No Fluff Just Stuff

Tweaking TextMate Groovy Bundle

Posted by: Venkat Subramaniam on October 27, 2007

When using TextMate to work with Groovy code, I use the Groovy Bundle. When you run your code, the default behavior of the bundle is to popup a window and display the results in it. This can be a minor inconvenience to problems at times. For one, to quickly see the output especially during a presentation, I find the popup window annoying. Furthermore, the output may not be what you want to see. Take the example of the following Groovy code (saved in sample.groovy):

bldr = new groovy.xml.MarkupBuilder()

bldr.html {
    body {
        h1('foo')
    }
}

When you press Apple R to run it, the popup window shows "foo" instead of the actual HTML output.



A little tweak to the bundle can fix this problem and make things more convenient. In TextMate, go to Bundles -> Bundle Editor -> Show Bundle Editor and navigate down to the Run command under Groovy.




Change the exit_show_html to  exit_show_tool_tip. Close the Bundle Editor and back in the TextMate editor, press Apple R to see the output appear as tool tip.


Venkat Subramaniam

About Venkat Subramaniam

Dr. Venkat Subramaniam is an award-winning author, founder of Agile Developer, Inc., creator of agilelearner.com, and an instructional professor at the University of Houston.

He has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia, and is a regularly-invited speaker at several international conferences. Venkat helps his clients effectively apply and succeed with sustainable agile practices on their software projects.

Venkat is a (co)author of multiple technical books, including the 2007 Jolt Productivity award winning book Practices of an Agile Developer. You can find a list of his books at agiledeveloper.com. You can reach him by email at venkats@agiledeveloper.com or on twitter at @venkat_s.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »