Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The Groovy TextMate Bundle

This page contains the TextMate bundle files that add Groovy & Grails support to the TextMate text editor for Mac OS X. They were originally written by Graeme Rocher (Grails project lead) and are made available as is.

DOWNLOAD

from here

However, the above link is not the latest code as the Groovy TextMate bundle is now hosted and maintained within the Macromates SVN repository. The details of which can be found here: http://macromates.com/wiki/Main/SubversionCheckout

INSTALLATION

Copy the Groovy and Grails bundle files to ~/Library/Application Support/TextMate/Bundles and start TextMate

USAGE

The bundles add Groovy and GSP support to files ending with .groovy and .gsp. There is syntax highlighting and code completion with snippets. All of the completions can be found in Bundles -> Groovy and Bundles -> Grails.

It is useful to look at these menus as a lot of the Groovy API is explore-able from there.

Some useful tips:

  • type "to" and hit TAB for type conversion by method call
  • type "as" and hit TAB for type conversion by coercion
  • type "with" and hit TAB for i/o stuff
  • typing ea, eawi, eal, eaf, eab, eam and hitting TAB do things like each, eachWithIndex, eachFile and so on
  • type "static" and hit TAB for various options for statics
  • type "cla" and hit TAB for class definition templates
  • typing ":" and hitting TAB creates key/value hash pair
  • Use ^ H to access JavaDoc help given you have them installed
  • Use ^ ENTER to create new methods
  • Use Apple + Run to execute the current file
  • Select some text and use ALT + APPLE + Run to execute the snippet

Remember after you have hit TAB you can often TAG through the code the template generates to modify each changeable value.

Version History

0.2

  • Fixed Multi-line Groovy string highlighting
  • Added for snippet with key "for" + TAB
  • Added Grails bundle

0.1

  • Initial revision

GantMate

GantMate allows you to run Gant tasks for your project from within TextMate. It is currently available from here for testing purposes but will be integrated into the Groovy bundle eventually.

GantMate.zip
Run Gant Task.tmCommand.zip

Installation

Grap the two zips from above. Unzip GantMate.zip and place in ~/Library/Application Support/TextMate/Bundles/Groovy.tmbundle/Support/. Unzip Run Gant Task.tmCommand.zip and double click to install. It should install itself in the Groovy bundle.

Usage

The default key mapping is control+shift+g and is scoped to Groovy source files.

  • No labels