couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <...@jsonified.com>
Subject Re: [DISCUSS] Erlang whitespace standards (was: [POLL])
Date Fri, 04 Apr 2014 07:11:57 GMT
On 04. April 2014 at 08:43:43, Paul Davis (paul.joseph.davis@gmail.com) wrote:

Thanks for the practical examples Paul.

> One of the best things I think could come out of this would be a tool
> that would re-indent source files similar to gofmt or something that
> would be the "canonical" indentation format whatever it is. That way
> if people really hate whatever is community consensus it doesn't
> matter as they can configure Git to run pre-commit hooks for
> reformatting or whatever. There's quite a bit of parsing/serializing
> stuff in Erlang so I don't think it'd be *too* terribly hard to
> implement.

It’s definitely possible, using emacs at least:

    https://gist.github.com/vladdu/8841089

The same could be done using vim, https://github.com/vim-erlang/vim-erlang-runtime
which is embedded in vim >= 7.4 by default.

https://github.com/vim-erlang/vim-erlang-runtime/blob/master/indent/erlang.vim

Overall I don’t mind what we use so long as I can run it automatically.

--  
Dave Cottlehuber
Sent from my PDP11




Mime
View raw message