Erlang Emacs mode
When I code erlang I use Eclipse with the plugin Erlide or Emacs with the erlang mode enabled.
Setting Erlide is really easy, but with Emacs if may be not trivial specially if you want to do it on Windows, anyway Erlang guys put online a good tutorial on how to set your environment.
I am using R13B04 and windows 7, here are the steps to set your environment:
- set in your environment the system variable HOME with the path of your emacs installation directory
- create inside that directory a .emacs.d directory
- create in the previous directory a file named init.el with the following lines (changing <Ver> and <ToolsVer> with your values. Please note that this file must be a .el file, so if you use Notepad double check that you are not saving it as a .txt file
(setq load-path (cons "C:/Program Files/erl<Ver>/lib/tools-<ToolsVer>/emacs" load-path)) (setq erlang-root-dir "C:/Program Files/erl<Ver>") (setq exec-path (cons "C:/Program Files/erl<Ver>/bin" exec-path)) (require 'erlang-start)
- restart your computer (if you set up the system variable for the first time)
- try to use emacs and edit an erlang file…you should have a nice indentation, color and some useful feature under the menu Erlang
- It is known (see this) that in this version of erlang a file is missing inside tools-<ToolVer>/emacs, this file is erlang-skels.el and you can find it here. Notice that the last link may be broken in the future, so in case just search for erlang.skels.el in the Internet.
Emacs is cooooool!