Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>Introduction</h1><p>Emacs remains the "one true editor" (apart from Vim of course which is the other "one true editor"). Many people prefer using editors rather than fighting with IDEs. Editors need support for specific languages, hence the need for a Groovy mode for Emacs. <a class="confluence-link" href="/display/GROOVY/Emacs+Plugin" data-linked-resource-id="14364" data-linked-resource-type="page" data-linked-resource-default-alias="Emacs Plugin" data-base-url="http://docs.codehaus.org">Emacs Plugin</a> is an old page kept for historical purposes outlining that there have been multiple goes at creating a Groovy mode for Emacs – each with their good bits and bad bits. Current development effort (thanks to Jim Morris) focuses on evolving the Emacs mode based on the Java mode of CC Mode initially started by <a href="http://www.russel.org.uk">Russel Winder</a>, coupled with the inferior mode by Stuart Clayman.</p><p>A release was made on 2010-11-13 (but there was a fault with the tarball that was corrected 2011-06-29, hence the date on the tarball), but it is recommended that people track the mainline rather than use releases.</p><p>The mainline is a Git repository held at the <a href="https://launchpad.net/groovy-emacs-mode">project's page on GitHub</a><a href="https://launchpad.net/groovy-emacs-mode">.</a></p><h1>Getting and Installing Groovy Mode</h1><h2>Using the Current Release by Download</h2><p>For those who want to download and install the current release tarball go to the <a href="https://launchpad.net/groovy-emacs-mode">Groovy Emacs Mode project page at Launchpad</a>. There is a big green button which points to the current release download file. There is no link to the current release tarball from this page so as to avoid pointing people at an old or out of date release. The summary instructions for install are:</p><ul><li>Download the tarball from the <a href="https://launchpad.net/groovy-emacs-mode">Groovy Emacs Mode page on Launchpad</a>.</li><li>Extract the content of the downloaded tarball to your ~/.emacs.d file (for Linux, Unix and Mac OS X), whatever the equivalent is for Windows.</li><li>Update your ~/.emacs.d/init.el or ~/.emacs file as needed to set up the appropriate autoload configuration. See "Setting Up Emacs" below.</li><li>Restart Emacs if it is already running.</li><li>Done.</li></ul><h2>Using a Git Repository</h2><p>For developers, or the more adventurous users who want to work with continuous update, then take a branch of the mainline somewhere on your filestore:</p><ul><li>git clone <a href="git://github.com/russel/Emacs-Groovy-Mode.git">git://github.com/russel/Emacs-Groovy-Mode.git</a> Emacs-Groovy-Mode</li></ul><p>This creates a Git repository in the subdirectory Groovy-Emacs-Mode of the current directory. You can update to the latest version by:</p><ul><li>cd Emacs-Groovy-Mode</li><li>git pull</li></ul><p>On systems other than Windows you can use symbolic links to put these files in the right place for Emacs to find them. So assuming that you put the Groovy mode branch in ~/groovy-emacs-mode and your emacs directory is ~/.emacs.d then:</p><ul><li>cd ~/.emacs.d</li><li>ln -s ../Emacs-Groovy-Mode/*.el .</li></ul><p>this should set up all the symbolic links needed.</p><p>(<em>Someone needs to write what to do on Windows.</em>)</p><h1>Setting Up Emacs</h1><p>Emacs needs to be told when to use Groovy mode. So in your initialization file (assumed default is ~/.emacs.d/init.el) you probably want to add:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>;;; turn on syntax highlighting (global-font-lock-mode 1) ;;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start (autoload 'groovy-mode "groovy-mode" "Major mode for editing Groovy code." t) (add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode)) (add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode)) ;;; make Groovy mode electric by default. (add-hook 'groovy-mode-hook '(lambda () (require 'groovy-electric) (groovy-electric-mode))) </pre></td></tr></table><p>or something equivalent.</p><h1>Reporting Bugs, Requests for Improvement</h1><p>Please use the <a href="https://bugs.launchpad.net/groovy-emacs-mode">The Groovy Emacs mode bug tracker</a> for reporting all bugs and requesting new features.</p><h1>Nota Bene</h1><p>This Groovy mode is developed and tested in the context of using Emacs 23. It should work with Emacs 22 but is untested. Likewise it should work with XEmacs but is untested.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced