Categories
Haxe

haXe and NME IDE and Editors OSX

I’ve been playing around with haXe for some time now. And when you do that, you will automatically notice NME.

HaXe is really awesome and very easy to learn when you are a ActionScript (AS3) developer. (NME has a great cheat sheet which also works for haXe).

But this post is not about explaining haXe or NME (just read the links I provided) and it’s not a tutorial about programming in haXe.
This is about programming: an IDE to help you develop much quicker.

There are a lot of IDE which support haXe: just check it here.
It seems like a big list…. but not entirely true…
For windows it’s easy: just get FlashDevelop.
Before I moved to OSX, I did all my Flash development on it and it rocks!

But for OSX it’s not that easy. So it comes down to a few contenders…
Sadly Sam Brick beat me with writing about this subject.
He only ends up taking another route… because there was no other choice.

But because I already started writing this post, I will finish it.

First I tried the editor I use for my Actionscript programming:

FDT 5 (PC, Mac and Linux) (free and €249/€499)

FDT is a commercial product (FDT max) but there is a free version (FDT free). And both version support haXe.
Although I love FDT for AS3 programming, I don’t feel that way for haXe. I miss to many features I have in the AS FDT (templates, trace, snippets, format, autoimport). It also feels very sluggish (I know Eclipse doesn’t help with that, but it feels soooo slow compared with the as3 counterpart.). And it doesn’t support NME and so although I wrote FDT templates for NME, it doesn’t help you.
FDT made a clever move adding haXe to its editor, but it should be labeled beta.

So I moved to my second editor on OSX:

TextMate (Mac only) (€44.85)

TextMate is a commercial product, but it will not set you back that much. You can try it for 30 days. And it’s awesome. I use it to open files quickly.
But what I don’t like about TextMate is the autocompletion… it’s under escape… doesn’t feel natural.

So my search brought me to a new editor:

SublimeText 2 (PC, Mac and Linux) (USD $59)

SublimeText 2 is a commercial product just like TextMate. You can evaluate this product for free and there is currently no enforced time limit for the evaluation.
This one is very good, still in beta but very useable.
You need to install the haXe bundle: the instruction can be found here

The haXe Sublime Text 2 bundle enables:

  • haXe compiler code completion and hints
  • syntax highlighting and basic completion for hx, hxml, hss and nmml files
  • Sublime build system integration
  • hxml parsing, automatic creation, and multiple build management (ctrl+shift+b)
  • supports NME projects (nmml)

This editor would have been my choice if there was no MonoDevelop (just wait and you will see 😛 ).

Another great solution would be:

IntelliJ IDEA (PC, Mac and Linux) (from €94 -> €664)

IntelliJ IDEA is a commercial product that you can try out for 30 days. It’s the choice that Sam Brick ended up with. I can’t tell you much about it.
I did install it but haven’t tried it simple because I already have FDT (set me back €499) and IntelliJ would cost another €189 (Personal license) for experiments.
But it seems very powerful and I know some AS3 developers who use it, so in that scenario IntelliJ would be the obvious choice.

Here comes the most promising editor (for now):

MonoDevelop (PC, Mac and Linux) (free!)

MonoDevelop…. it even sounds like FlashDevelop and its free like FlashDevelop. This is so new that there is not a lot of blogging done about it (Saumya beat me to it 🙁 )
This is one awesome project which is so new it still has ribbons on it! One of the lead programmers of NME; Joshua Granick asked himself why FlashDevelop (his code editor of choice) couldn’t be ported to Linux and OSX.
He learned from previous attempts and made a start with it… and it works!

I’m not going to repeat what Joshua said; just go and visit his blog and read about it (and then return here again…. I’ll just wait for a minute of two) FlashDevelop for Mac/Linux: Part 1

If you want to know about the latest development of this addin, you can follow Joshua on twitter: @singmajesty.

Currently you have to copy the .dll from the git repository to a the correct folder but then it should work fine.
But that can change very quickly:

I’m waiting for MonoDevelop to allow my add-in in the official (beta) repositories. That will make it much easier to upgrade in the future

source


Note:
Oh still here? You want to know how to get started?
First you need to download MonoDevelop.HaxeBinding.dll from Github: press the button “Raw” and the file will be downloaded.
Then you need to copy it in the folder: ~/Library/Application Support/MonoDevelop-2.8/LocalInstall/Addins.
This folder will not be there so you need to create it for yourself (this path is when you use OSX and installed the latest MonoDevelop).

Don’t feel very comfortable doing that?
MonoDevelop can create the folder for you … but you still need to copy the .dll yourself.
goto: MonoDevelop > Add-in manager… > gallery > IDE extensions > Specflow Support > install…
and then uninstall it again (folders are made, but you don’t need the extension)


You don’t have to install it by hand… just goto:
MonoDevelop > Add-in Manager > Gallery tab > Language bindings > Haxe language Binding

This is not the latest version (as fare as I know) so if you are more adventurous the github download and install is still the way to go (that’s what I’m doing).

8 replies on “haXe and NME IDE and Editors OSX”

Great article Matthijs. I’ve used Monodevelop very rarely for Unity purposes. I actually never knew it was extendible to HaXe. 🙂 I’ve spend a lot of money on FDT in the past but indeed the HaXe editor and compiler are very very beta. And HaXe/NME is the way to go (for me at least) So as soon as I’m done with my current business I’m gonna check this all out.

Cheers!

Good overview, but you forgot of the excellent MacVim (+ Justin’s vimhaxe) and Emacs. Both have native OSX apps, and IMHO, they are the (still) best editors (and they can turn into an IDE, Emacs specially) around.

Textmate2 is now opensource ( I prefer the original textmate ). But it’s important to note that textmate2 is opensource and I guess the autocompleation could be improved by haxe users and other features added. The built in terminal and remote access features are very powerful.

the haxe plugin doesn’t work for monodevelop 4.xx and the monodevelop website doesn’t list 3.xx for download?

Hi John,
I really don’t know if the haxe plugin works with monodevelop 4, I still have 3 installed.
And I also can’t find a older version of Monodevelop to install…

I stopped using Monodevelop for my haxe programming and use Sublime now.
Perhaps I can redirect you to an other post I wrote about haxe IDE’s
Haxe and nme ide and editors osx

happy coding!

Comments are closed.