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/
update-mime-database /usr/share/mime
Launch gedit and open a groovy file or a gsp file. You should now have syntax highlighting.
Hi,
ReplyDeleteThanks for your post ! It worked great. I also asked upstream to include your files, I hope that's ok with you !
https://bugs.edge.launchpad.net/ubuntu/+source/gtksourceview/+bug/291789
http://bugzilla.gnome.org/show_bug.cgi?id=553894
https://bugs.edge.launchpad.net/ubuntu/+source/shared-mime-info/+bug/291811
https://bugs.freedesktop.org/show_bug.cgi?id=18329
Luis
Hi,
ReplyDeleteUpstream 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.
Thanks !!
Luis
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:
ReplyDeleteDo 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.
works great!
ReplyDeleteThanks!
ReplyDeleteThanks!! Great job. Works with fedora 10. Never knew gedit could be so powerful.
ReplyDeleteNo problem Derek.
ReplyDeleteI 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.
ReplyDeleteMuchas gracias por tu miniguia, está excelente.
ReplyDeleteJust a note for current googlers, this method will yield namespace warnings on Ubuntu Lucid (10.4) - and it doesn't work.
ReplyDeleteHowever, 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.
Cheers!