Subject: Exported From Confluence
Content-Type: text/html; charset=UTF-8
This page is an =
old one kept around only for the historical record. The materials men=
tioned as being in the Groovy Subversion repository have been deleted from =
that repository, so the links for those files are broken.
groovy-mode for (X)Emacs
Jeremy Rayner created a groovy-mode for (X)Emacs, which has syntax hilig=
hting, 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.
Russel Winder has begun an alternative version of groovy-mode as a deriv=
ed mode in CC Mode. Currently, this has some problems with indenting =
when semicolons are not used as statement terminators but this is being act=
ively worked on -- CC Mode has support for languages like Awk and Groovy th=
at do not require semicolons.
Stuart Clayman has created a "Groovy inferior mode" (nothing i=
nferior about Stuart's code but this is the jargon for an interpreter execu=
tion mode) which allows groovysh to be run from within (X)Emacs.
(NB Links go to the latest versions in Subversion)
Download Jeremy's groovy-mode.el file and place it somewhere =
like (on OSX)
br /> your mileage may vary...
Download Russel's groovy-mode.el and place it in your (X)Emacs' load=
NB As both Jeremy's and Russel's are called groovy-mode you have to have=
one or the other, you can't have both.
Download Stuart's inf-groovy.el and place it in your (X)Emacs load pa=
I had problems with Fisheye, and had to go to SVN directly. Here are the=
add the following lines to your ~/.emacs file:
;;; turn on syntax hilighting
;;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start
(autoload 'groovy-mode "groovy-mode" "Groovy editing mode.&q=
(add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode))
(add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))
Comments regarding Jeremy's mode:
- check this works in xemacs, and put your results in this page (anyone c=
an edit )
- The Groovy mode appears to work in XEmacs, but setting the global-font-=
lock-mode gets a message and was commented. Thanks!
- I concur that groovy mode works in XEmacs and that the global-font-lock=
-mode needs to be commented. The indent level default was changed from 4 to=
- sort out the comment blocks, as it is currently based on ruby, where th=
e symbol # currently denotes the start of a comment, maybe this can be crib=
bed from java-mode...
- at the moment you have to hit tab to do indents, I'm sure emacs can do =
this automatically on carriage return...
Comments regarding Russel's mode:
- Get optional semicolons working properly.
- Get the font-lock colouring a bit more consistent.
- Jeremy's mode is based upon ruby-mode in ruby stable snapshot - Wed Nov=
24 04:01:06 JST 2004. This is just a quick hack of a groovy-mode, so if it=
's broken for you, fix it and share with the world.
- Russel's mode has "issues" when used with CC Mode 5.31 where =
groovy-mode is not compiled and CC Mode is.