[erlang-questions] Is there any erlang code formatting tool?
Liu Yubao
yubao.liu@REDACTED
Wed Feb 4 04:21:13 CET 2009
Hi,
Thank you very much, I should have digged the document more carefully.
On Tue, Feb 3, 2009 at 2:59 PM, Bengt Kleberg
<bengt.kleberg@REDACTED> wrote:
> Greetings,
>
> I have used parts of the Syntax_Tools
> (http://erlang.org/doc/apps/syntax_tools/index.html) for Erlang
> formatting without Emacs.
> For batch processing of files you might want to look at erl_tidy
> (http://erlang.org/doc/man/erl_tidy.html).
> If you want a tool that takes care of a function in a file, you can talk
> to me.
>
>
> bengt
>
> On Tue, 2009-02-03 at 14:46 +0800, Liu Yubao wrote:
>> Hi,
>>
>> I prefer Vim to edit and Emacs to format erlang code but
>> switching between two editors is very inconvenient. Is
>> there any erlang code formatting tool? Or how can I use emacs
>> to format erlang source files in batch?
>>
>> The default setting of erlang-mode indent code by tab characters
>> and spaces, I prefer four spaces to one tab, how to change the
>> setting of erlang-mode to make it indent code with four spaces?
>>
>> Below is output from vim(et ts=4 sw=4) and emacs(default setting):
>>
>> ---------------vim, formatted with "gg=G":
>> {ehtml,
>> {table, [{border, "1"}, {cellpadding, "2"}, {cellspacing, "2"}],
>> [{thead, [],
>> {tr, [],
>> [{th, [], "File path"},
>> {th, [], "Module name"},
>> {th, [], "Last modified time"},
>> {th, [], "Status"}]}},
>> {tbody, [], Rows}]}}.
>>
>> ----------------emacs:
>> {ehtml,
>> {table, [{border, "1"}, {cellpadding, "2"}, {cellspacing, "2"}],
>> [{thead, [],
>> {tr, [],
>> [{th, [], "File path"},
>> {th, [], "Module name"},
>> {th, [], "Last modified time"},
>> {th, [], "Status"}]}},
>> {tbody, [], Rows}]}}.
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list