Scala with gedit
November 14th, 2009 posted in blog
Scala is a promising language and when you want to develop in Scala you have several options. You can choose to use an IDE like Idea, Eclipse or Netbeans. You get Scala integration in all of them with plugins or even out of the box as Idea promises for their community edition.
However I tried all of them and for my understanding all of them are too slow for just getting started with Scala.
I chose to simply use a text editor of my choice which happens to be “gedit” which is shipped with almost any gnome desktop environment. It’s not the lightest editor on planet but very light compared to Idea, Netbeans and Eclipse. Out of the box it suffers from supporting Scala syntax coloring. But the people around Scala are prepared for that and offer a language definition for all kinds of editors including gedit.
You can grab the latest language definition for gedit at the scala src trunk. The README tells you where to copy the file. There are also definitions for xcode, vim, ultraedit, textwrangler, textpad, textmate, subethaedit, scite, notepad-plus, latex, kate, jedit, intellij, geshi, emacs, context, bluefish and a2ps.
When developing Scala there are mainly three tasks you want to execute:
For task one “execute a scala script” use the following code: execute-a-scala-script-in-gedit
For the second task “compile a scala source” use the following code: compile-a-scala-source-in-gedit
For the last task use this piece of code: execute-a-scala-application-in-gedit
Make sure to modify the path of scala or just leave out the path if scala is in your path. Also define shortcuts so you can reach those tasks more easily.
This is more or less a working Scala working environment which is enough for the first dive into this programming language. It works for me
. Just make sure your shebang is bash and not just sh…
Cheers,
Andreas.
However I tried all of them and for my understanding all of them are too slow for just getting started with Scala.
I chose to simply use a text editor of my choice which happens to be “gedit” which is shipped with almost any gnome desktop environment. It’s not the lightest editor on planet but very light compared to Idea, Netbeans and Eclipse. Out of the box it suffers from supporting Scala syntax coloring. But the people around Scala are prepared for that and offer a language definition for all kinds of editors including gedit.
You can grab the latest language definition for gedit at the scala src trunk. The README tells you where to copy the file. There are also definitions for xcode, vim, ultraedit, textwrangler, textpad, textmate, subethaedit, scite, notepad-plus, latex, kate, jedit, intellij, geshi, emacs, context, bluefish and a2ps.
When developing Scala there are mainly three tasks you want to execute:
- execute a scala script
- compile a scala source
- run a scala application
For task one “execute a scala script” use the following code: execute-a-scala-script-in-gedit
For the second task “compile a scala source” use the following code: compile-a-scala-source-in-gedit
For the last task use this piece of code: execute-a-scala-application-in-gedit
Make sure to modify the path of scala or just leave out the path if scala is in your path. Also define shortcuts so you can reach those tasks more easily.
This is more or less a working Scala working environment which is enough for the first dive into this programming language. It works for me
Cheers,
Andreas.
follow comments via rss
