[erlang-questions] Is there any erlang code formatting tool?

Torbjorn Tornkvist tobbe@REDACTED
Sat Feb 14 00:13:28 CET 2009


Csaba Hoch <csaba.hoch@REDACTED> writes:

> 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?

Have a look here:

  http://blog.tornkvist.org/blog.yaws?id=1233867602690448

--Tobbe

>
> 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

-- 
KREDITOR EUROPE AB
S:t Eriksgatan 117
SE-113 43 Stockholm, Sweden
Tel:   +46(0)8-120 120 00
Fax:   +46(0)8-120 120 99
Email: torbjorn.tornkvist@REDACTED
Web:   www.kreditor.se




More information about the erlang-questions mailing list