I’m just starting to learn Erlang and have figured out that Emacs is a pretty popular choice for an editor/IDE. For good reason — the syntax highlighting is excellent, you can have the erlang shell open within Emacs, so you don’t have to edit->save->switch to Erlang->compile->try your code. Instead you hit ctrl-c, ctrl-k and you’re dumped in an erlang shell with the code already compiled. If there were errors you can jump back to the offending line with another keystroke.
Unfortunately, getting everything set up is not simply clicking “OK” on an automated installer dialogue. But it’s not terribly hard. The hard part is getting used to Emacs if you’re new to it — and if you are new to Emacs, be assured that it is worth spending the time to learn it.
Here is what I’ve found:
Setting up an Erlang environment on Windows 7:
1: Download Erlang http://www.erlang.org/download.html Pick the 64 bit binary file (or the appropriate one for your version of windows). Run the installer.
Pick the latest .zip file for windows.
Expand the zip file into c:\emacs
Browse into c:\emacs\emacs<version>\bin
Open your start menu, browse to the emacs icon, right-click on it. Set the start directory to someplace you’d like it to be (e.g. when opening files, the directory you start in — c:\dev, or c:\users\username\Documents\, or whatever).
Go into computer properties and set a new user variable “HOME” = c:\users\username\
Edit c:\users\username\.emacs, and put the following into it: [Note the "." before the emacs filename]
(setq load-path (cons “C:/Program Files/erl5.10.3/lib/tools-2.6.12/emacs” load-path))
(setq erlang-root-dir “C:/Program Files/erl5.10.3″)
(setq exec-path (cons “C:/Program Files/erl5.10.3/bin” exec-path))
[Note: Modify the version numbers to match what you've got.]
3: Run erlang from the start menu icon to ensure it comes up.
4: Run emacs from the start menu, then open/create an erlang (.erl) file. Type in some erlang and make sure the syntax highlighting is on.
Erlang mode in Emacs is described here: http://www.erlang.org/doc/man/erlang.el.html and http://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html