Message from discussion
Is there any erlang code formatting tool?
Received: by 10.103.121.19 with SMTP id y19mr57308mum.24.1234537970036;
Fri, 13 Feb 2009 07:12:50 -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 13si321202bwz.7.2009.02.13.07.12.49;
Fri, 13 Feb 2009 07:12:49 -0800 (PST)
Received-SPF: pass (google.com: domain of erlang-questions-boun...@erlang.org designates 193.180.168.22 as permitted sender) client-ip=193.180.168.22;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of erlang-questions-boun...@erlang.org designates 193.180.168.22 as permitted sender) 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 n1DFAgVv002676;
Fri, 13 Feb 2009 16:10:52 +0100 (CET)
Received: from mail-fx0-f20.google.com (mail-fx0-f20.google.com
[209.85.220.20])
by morgoth.cslab.ericsson.net (8.14.0/8.14.0) with ESMTP id
n1DFAaM6029925
for <erlang-questi...@erlang.org>; Fri, 13 Feb 2009 16:10:36 +0100 (CET)
Received: by fxm13 with SMTP id 13so3472859fxm.22
for <erlang-questi...@erlang.org>; Fri, 13 Feb 2009 07:10:31 -0800 (PST)
Received: by 10.223.115.16 with SMTP id g16mr191962faq.93.1234537831295;
Fri, 13 Feb 2009 07:10:31 -0800 (PST)
Received: from ?78.131.80.66? (78-131-80-66.pool.hdsnet.hu [78.131.80.66])
by mx.google.com with ESMTPS id 35sm2262621fkt.23.2009.02.13.07.10.29
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Fri, 13 Feb 2009 07:10:30 -0800 (PST)
Message-ID: <49958D69.1030105@gmail.com>
Date: Fri, 13 Feb 2009 16:10:33 +0100
From: Csaba Hoch <csaba.h...@gmail.com>
User-Agent: Thunderbird 2.0.0.19 (X11/20090105)
MIME-Version: 1.0
To: erlang-questi...@erlang.org
References: <4987E836.2070608@gmail.com>
In-Reply-To: <4987E836.2070608@gmail.com>
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
Liu Yubao wrote:
> 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?
Hi,
If you put this in your .vimrc, you can ask Emacs to indent the file
that you are editing by typing :IndentErl.
command! IndentErl call IndentErlangWithEmacs()
function! IndentErlangWithEmacs()
exec '!emacs --eval "(progn (find-file \"' . expand('%:p') . '\")' .
\ '(erlang-indent-current-buffer) (save-buffer) '.
\ '(save-buffers-kill-emacs))"'
endfunction
Csaba
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions