[erlang-questions] Controversial subject of the day: tabs and spaces for indentation

kraythe . <>
Wed Feb 5 22:45:05 CET 2014


I have long favored the enforcement of coding style at the repository
level. Then it doesnt matter if someone accidentally reformats their local
copy, the checkin will reformat it accordingly. I dont think people will
ever agree on the "right" format in something that is inherently a matter
of taste. I like tight code with only 2 char indents and as much on the
screen at once. Another guy I know loves drop braces with a brace on the
next line (for java, C, etc). Neither of us is wrong. If the repo checkin
had a reformatter, it wouldn't matter.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Wed, Feb 5, 2014 at 3:36 PM, Vlad Dumitrescu <> wrote:

> > If the debate uncovers some workarounds that make the pain less
> > painful (pun intended), then even better.
>
> I just found out that we could do something like this to reindent files:
>
> emacs -batch sample.erl --eval '(indent-region (point-min) (point-max)
> nil)' -f save-buffer
>
> /Vlad
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140205/d8c1bc6d/attachment.html>


More information about the erlang-questions mailing list