savaged.info

2009-07-31

groovy minimalism

Filed under: technology,workfriendly — savaged.info @ 12:05
Tags: , , , , , , , ,

Being a minimalist, I’m not a fan of a heavy IDE, using them only when I have to. I think IDEs are like dogs, they sense your fear. At present Netbeans 6.7 seems to me to be the best trained pooch. For now however, let me propose an alternative and some background…

Recently I’ve been getting into Groovy and Grails, no doubt also appealing to my minimalist leanings. Convention over configuration let’s someone else do all the stuff that would normally clutter my development process. You have to give the tutorials a go (Groovy / Grails). If you’re a minimalist, lean processes type too, I feel sure you’ll not look back.

Now I’ve found I can mix the agility of Groovy and Grails and my favourite editor vi. At home I use Mac (did I mention I’m a minimalist). On my Mac I have MacVim. At work I’m forced to used MS Windows, I have CygWin and include vim from the setup tool.

Of course, I could have used TextMate on my Mac, and at work, the clone for MS “e“. However, I’m also a minimalist when it comes to paying money out (aka: being tight).

There are a few hoops to jump through to get going; I wanted to share them with all the other minimalists.

Step 1

Get a vimrc file working. See http://macvim.org/OSX/index.php. Particularly note the instructions about getting the $VIMRUNTIME/vimrc_example.vim files. (Works on MS Windows too, and probably Linux).

Step 2

Get Groovy language highlighting. Download groovy.vim. You might need to create a .vim directory in your home, and a ftplugin directory in there. Once you have that you just drop the groovy.vim file into ftplugin (works for both Mac and MS).

Step 3

Add NERDTree. Download and unzip NERD_tree.zip. Put the NERD_tree.vim file into your ./vim/plugin directory and NERD_tree.txt into your .vim/doc directory. (Note that you might need to create plugin and doc directories, if it’s your first plugin).

Step 4

Add snipMate. Download and unzip snipMate.zip into your ./vim/plugin and doc directories; as you did above.

Step 5

In vim run :helptags ~/.vim/doc then :help local-additions to view the docs for both the plugins.

Step 6

In vim run something like :NERDTree /mycode/mygroovyproj/

Step 7

Revel in the simplicity of your new development environment ;)

Finally, when you really do need an IDE then there’s great Groovy & Grails support in Netbeans and now in Eclipse. Oh and the one you have to pay for, Intellij.

Create a free website or blog at WordPress.com.