Groovy Tip: Running Groovy from Sublime Text Editor

I just came across this cool little trick to compile and run Groovy scripts from Sublime Text Editor.

  • Open the editor and go to menu Tools->Build System. This will open a new file named ‘untitled.sublime-build‘.
  • Add the path to your Groovy installation directory as show below.
{
 "cmd": ["C:/apps/Groovy/groovy-2.1.9/bin/groovy.bat", "$file"]
}
  • Now ‘save’ the file as ‘groovy.sublime-build‘.
  • Open your groovy script and in the menu select ‘Tools->Build System->Groovy’
  • To compile and execute, ‘Tools->Build’ or F7 or Ctrl+B.

 

Advertisements

6 thoughts on “Groovy Tip: Running Groovy from Sublime Text Editor

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s