Setting up Emacs for programming Erlang

2019-03-12 07:41发布

Emacs is the IDE of choice for programming Erlang.

There are plenty of good modes (distel, erlware-mode, the default erlang mode,...), but what are your recommendations for setting up Emacs for professional Erlang development?

标签: emacs ide erlang
6条回答
干净又极端
2楼-- · 2019-03-12 08:10

If you want more than erlang-mode offers, a possible alternative to Distel is EDTS, the Erlang Development Tool Suite. To quote the readme file:

EDTS is meant to be a able to replace Distel but only provides part of the most commonly used of Distel's features, specifically the equivalents of erl-find-module, erl-find-source-under-point, erl-who-calls and erl-refactor-subfunction. As far as I know, those are the only Distel features that 98% of people use, but if there is anything from Distel that you are missing in EDTS, please let me know.

If you are using EDTS, please remove Distel from your configuration, since running both can create some confusion.

查看更多
疯言疯语
3楼-- · 2019-03-12 08:10

erlang.el (for indentation and font-locking) and Distel (debugger, M-. etc.) are essential. ESense, I've never used, and I've no idea what the erlware mode does. You may want to use some of the standard Emacs utilities (flymake, interface to version control, and so forth) when writing Erlang.

查看更多
相关推荐>>
4楼-- · 2019-03-12 08:17

I found out ESense on emacswiki. Might worth a try.

查看更多
欢心
5楼-- · 2019-03-12 08:18

I've found erlang-mode ok but it doesn't support kerl (which is a useful thing, kinda like rvm for erlang, except it works).

So I started this:

https://github.com/nicferrier/emacs-erlang-extras

which supports multiple erlangs.

I'm intending that it will support rebar as well:

https://github.com/rebar/rebar/wiki/Getting-started

查看更多
一夜七次
6楼-- · 2019-03-12 08:23

Look onto this article about different packages for work with Erlang from Emacs. I personally use erlware-mode + distel

查看更多
疯言疯语
7楼-- · 2019-03-12 08:27

Set up erlang-mode as described in the README, and then activate Flymake:

(require 'erlang-flymake)

That gives you highlighting of warnings and errors as you type.

I'd recommend using erlang-mode from the latest Erlang/OTP release (R14A as I type this), regardless of what release you normally use, as it evolves quite rapidly and is now just as good as erlware-mode, IMHO.

If you're using Emacs 24 or later, I recommend installing erlang-mode from MELPA. The 'erlang' package tracks the 'maint' branch of the Erlang/OTP Git repository, so it is always reasonably up-to-date.

查看更多
登录 后发表回答