Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This page is an old one kept around only for the historical record.  The materials mentioned as being in the Groovy Subversion repository have been deleted from that repository, so the links for those files are broken.

Russel Winder's mode and Stuart Clayman's inferior mode have been collected together in a

...

Git repository, heavily worked on by Jim Morris, which is available for use by download from the

...

Launchpad page. See also the current and up-to-date page Emacs Groovy Mode.

groovy-mode for (X)Emacs

Jeremy Rayner created a groovy-mode for (X)Emacs, which has syntax hilighting, recognises curly brace indentation (just use the tab key), and doesn't panic about optional semicolons.  He tested it in Emacs on Mac OSX 10.3, and others use it and it isn't painful.

...

add the following lines to your ~/.emacs file:

Code Block

;;; turn on syntax hilighting
(global-font-lock-mode 1)

;;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start
(autoload 'groovy-mode "groovy-mode" "Groovy editing mode." t)
(add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode))
(add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))

...