Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Is there any erlang code formatting tool?

Received: by 10.86.36.11 with SMTP id j11mr141483fgj.26.1233718006370;
        Tue, 03 Feb 2009 19:26:46 -0800 (PST)
Return-Path: <erlang-questions-boun...@erlang.org>
Received: from morgoth.cslab.ericsson.net (morgoth.cslab.ericsson.net [193.180.168.22])
        by mx.google.com with ESMTP id 3si766811fgg.4.2009.02.03.19.26.46;
        Tue, 03 Feb 2009 19:26:46 -0800 (PST)
Received-SPF: neutral (google.com: 193.180.168.22 is neither permitted nor denied by best guess record for domain of erlang-questions-boun...@erlang.org) client-ip=193.180.168.22;
Authentication-Results: mx.google.com; spf=neutral (google.com: 193.180.168.22 is neither permitted nor denied by best guess record for domain of erlang-questions-boun...@erlang.org) smtp.mail=erlang-questions-boun...@erlang.org
Received: from morgoth.cslab.ericsson.net (_mail...@localhost.cslab.ericsson.net [IPv6:::1])
	by morgoth.cslab.ericsson.net (8.14.0/8.14.0) with ESMTP id n143LIwN019710;
	Wed, 4 Feb 2009 04:21:28 +0100 (CET)
Received: from rv-out-0708.google.com (rv-out-0708.google.com [209.85.198.240])
	by morgoth.cslab.ericsson.net (8.14.0/8.14.0) with ESMTP id
	n143LE0w022700
	for <erlang-questi...@erlang.org>; Wed, 4 Feb 2009 04:21:14 +0100 (CET)
Received: by rv-out-0708.google.com with SMTP id f25so2371309rvb.22
	for <erlang-questi...@erlang.org>; Tue, 03 Feb 2009 19:21:13 -0800 (PST)
MIME-Version: 1.0
Received: by 10.141.19.9 with SMTP id w9mr1974338rvi.252.1233717673455; Tue, 
	03 Feb 2009 19:21:13 -0800 (PST)
In-Reply-To: <1233644349.4910.4.camel@seasc1137.dyn.rnd.as.sw.ericsson.se>
References: <4987E836.2070608@gmail.com>
	<1233644349.4910.4.camel@seasc1137.dyn.rnd.as.sw.ericsson.se>
Date: Wed, 4 Feb 2009 11:21:13 +0800
Message-ID: <7e5dd98f0902031921u623fb68xeeaf81b1a5cdd438@mail.gmail.com>
From: Liu Yubao <yubao....@gmail.com>
To: bengt.kleb...@ericsson.com
Cc: erlang-questi...@erlang.org
Subject: Re: [erlang-questions] Is there any erlang code formatting tool?
X-BeenThere: erlang-questi...@erlang.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Erlang/OTP discussions <erlang-questions.erlang.org>
List-Unsubscribe: <http://www.erlang.org/mailman/listinfo/erlang-questions>,
	<mailto:erlang-questions-requ...@erlang.org?subject=unsubscribe>
List-Archive: <http://www.erlang.org/pipermail/erlang-questions>
List-Post: <mailto:erlang-questi...@erlang.org>
List-Help: <mailto:erlang-questions-requ...@erlang.org?subject=help>
List-Subscribe: <http://www.erlang.org/mailman/listinfo/erlang-questions>,
	<mailto:erlang-questions-requ...@erlang.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: erlang-questions-boun...@erlang.org
Errors-To: erlang-questions-boun...@erlang.org

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.kleb...@ericsson.com> 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-questi...@erlang.org
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questi...@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions