<div dir="ltr">Thanks for the suggestions!<div><br></div><div>I took a look at each, but none of the three options really gave me what I wanted.  So I ended up wrapping erl_tidy in a way that gives me what I want:</div><div><br></div><div>:%!erlfmt</div><div><br></div><div>Here's the source, such as it is: <a href="https://github.com/mbucc/erlfmt">https://github.com/mbucc/erlfmt</a>.</div><div><br></div><div>It was able to format 1,794 out of 1,795 source files under /usr/local/Cellar/erlang/<a href="http://18.2.1.">18.2.1.</a>  It failed to format lib/erlang/lib/wx-1.6/src/gen/gl.erl, which is 971KB in size.</div><div><br></div><div>Mark</div>







</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 3:09 AM, Roger Lipscombe <span dir="ltr"><<a href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I use vimerl (<a href="https://github.com/jimenezrick/vimerl" rel="noreferrer" target="_blank">https://github.com/jimenezrick/vimerl</a>), which has an<br>
escript included:<br>
<a href="https://github.com/jimenezrick/vimerl/blob/master/indent/erlang_indent.erl" rel="noreferrer" target="_blank">https://github.com/jimenezrick/vimerl/blob/master/indent/erlang_indent.erl</a><br>
<br>
I *believe* that it's equivalent to Emacs erlang-mode, but I don't<br>
have Emacs installed :-P<br>
<div class="HOEnZb"><div class="h5"><br>
On 28 April 2016 at 07:24, Pierre Fenoll <<a href="mailto:pierrefenoll@gmail.com">pierrefenoll@gmail.com</a>> wrote:<br>
> I made <a href="https://github.com/fenollp/erlang-formatter" rel="noreferrer" target="_blank">https://github.com/fenollp/erlang-formatter</a> though it depends on<br>
> OTP's Emacs erlang-mode.<br>
><br>
> erlang-mode has been the de facto authority in terms of linting.<br>
> However it has some issues, like when indenting typed record definitions.<br>
><br>
> Dropping the dependency on Emacs would be great but again, which dev/CI<br>
> machine doesn't have Emacs?<br>
><br>
> On 28 Apr 2016, at 00:46, Tristan Sloughter <<a href="mailto:t@crashfast.com">t@crashfast.com</a>> wrote:<br>
><br>
> Short answer: No.<br>
><br>
> Long answer: No, but I'd love for someone with the time to clean up<br>
> <a href="https://github.com/tsloughter/erl_tidy" rel="noreferrer" target="_blank">https://github.com/tsloughter/erl_tidy</a> which is a rebar3 plugin named `fmt`<br>
> around erl_tidy. the erl_tidy code has issues with type specs and other<br>
> newer syntax and will currently just dump out the AST for those. These fixes<br>
> would then, of course, need to be submitted upstream to OTP, but this plugin<br>
> provides a testing ground and hopefully motivation to someone out there :)<br>
><br>
> --<br>
> Tristan Sloughter<br>
> <a href="mailto:t@crashfast.com">t@crashfast.com</a><br>
><br>
><br>
><br>
> On Wed, Apr 27, 2016, at 05:37 PM, Mark Bucciarelli wrote:<br>
><br>
> Hi,<br>
><br>
> I'm wondering if anyone here uses or knows of a utility like gofmt for<br>
> Erlang.  If you're not familiar with gofmt, it simply reads source code on<br>
> stdin and writes formatted source code to stdout.<br>
><br>
> I looked at erl_tidy but cannot see how to make it read stdin.<br>
><br>
> Thanks,<br>
><br>
> Mark<br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>