Setting up gedit for groovy and grails
I use CentOS5 and Ubuntu 8.04.
Save groovy-mime.xml to your home directory.
Save groovy.lang to your home directory.
Save gsp-mime.xml to your home directory.
Save gsp.lang to your home directory.
The above 4 files are not under any restrictive license. They are for anyone who may want them for any use they may wish to put them to.
Log-in as root or you can also log-in as a non-root user with sudo permissions.
If you do login as a non-root user then you should make the appropriate changes to the commands below i.e. by adding sudo before each of the commands. Open a command line terminal and do:
mv ~/groovy-mime.xml /usr/share/mime/packages/
mv ~/groovy.lang /usr/share/gtksourceview-2.0/language-specs/
mv ~/gsp-mime.xml /usr/share/mime/packages/
mv ~/gsp.lang /usr/share/gtksourceview-2.0/language-specs/
Launch gedit and open a groovy file or a gsp file. You should now have syntax highlighting.
Thanks for your post ! It worked great. I also asked upstream to include your files, I hope that's ok with you !
Upstream asked me if there your files were under the LGPL license. Please let me know if its ok to include your work in upstream and the type of license you associate with it.
Please respond to the last comment at http://bugzilla.gnome.org/show_bug.cgi?id=553894. They are waiting for you to answer yes to this question:ReplyDelete
Do you agree if we include it in gtksourceview upstream relicensing them as LGPL v.2.1 or later?
I'd love to see Groovy syntax support get officially added to Gnome. Thanks for your contribution.
Thanks!! Great job. Works with fedora 10. Never knew gedit could be so powerful.ReplyDelete
No problem Derek.ReplyDelete
I just wish they'd put it in by default.
Sorry, but does not work with me for Ubuntu 9.10. See http://www.grails.org/Gedit instead.ReplyDelete
Muchas gracias por tu miniguia, está excelente.ReplyDelete
Just a note for current googlers, this method will yield namespace warnings on Ubuntu Lucid (10.4) - and it doesn't work.ReplyDelete
However, not to worry, I found http://github.com/aeischeid/gedit-grails-bundle which works great. Just git clone the URL and execute the install.sh script. I got a warning about a grails directory not existing, but simply commented that line out and ran the script again and was happy coding in gedit w/ syntax highlighting for .groovy files.