Wednesday, July 30, 2008

Setting up gedit for groovy and grails

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.

10 comments:

  1. Hi,

    Thanks 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

    ReplyDelete
  2. Hi,

    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.

    Thanks !!

    Luis

    ReplyDelete
  3. 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:

    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.

    ReplyDelete
  4. Thanks!! Great job. Works with fedora 10. Never knew gedit could be so powerful.

    ReplyDelete
  5. No problem Derek.

    I just wish they'd put it in by default.

    ReplyDelete
  6. Sorry, but does not work with me for Ubuntu 9.10. See http://www.grails.org/Gedit instead.

    ReplyDelete
  7. Anonymous12:06 PM

    Muchas gracias por tu miniguia, está excelente.

    ReplyDelete
  8. Just a note for current googlers, this method will yield namespace warnings on Ubuntu Lucid (10.4) - and it doesn't work.

    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.

    Cheers!

    ReplyDelete