Is this reasonable?
I suspect Manlio was referring to something like this
http://nickgravgaard.com/elastic-tabstops/.
Dan
On Thu, 2020-01-30 at 01:10 +0100, Wojciech S. Czarnecki wrote:
> Dnia 2020-01-29, o godz. 09:56:35
> Manlio Perillo <manlio...@gmail.com> napisał(a):
>
> > What I propose is to use a tab between the field name and type.
> > It is responsibility of the editor or html formatter to align the
> > code.
>
> This ("between") assumes an agreed constant width of the tab
> representation.
> Ie. it will never work as intended in the field as people are using
> tabwidths from 2 to 8.
>
> > Manlio Perillo
>
> Hope this helps,
>
> --
> Wojciech S. Czarnecki
> << ^oo^ >> OHIR-RIPE
>
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to golan...@googlegroups.com.
Dnia 2020-01-30, o godz. 05:50:36
Manlio Perillo <manlio...@gmail.com> napisał(a):
But it calls for other solution. Namely:
===
Gofmt should have -u for "unformat" and -g for "format for a git difftool"
functionality added.
Called with -u it would produce source with minimal whitespace possible — to be
used in the commit pipeline.
Called with -g on the difftool pipeline it would try to nicely format diff chunk.
===
This is a proposal for the next version Go.Currently gofmt formats struct fields to make the field name and type aligned.However this may cause extra changes in a commit diff when one field is added or removed.
Dnia 2020-02-18, o godz. 10:16:57
Manlio Perillo <manlio...@gmail.com> napisał(a):
> Here is an example of a diff with a lot of noise, where the actual change
> is very hard to see:
> https://gist.github.com/perillo/c5b3bdff9e8db9c89f316670d129c0dd
> Manlio
I just posted a brief proposal — keep tabs on it, as I neither have a time for,
nor I long for next round of defending the obvious again.
https://github.com/golang/go/issues/37299
TC,
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/kp5-wX2ONdc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-U%3DMomr0MMZcSpt5OdajMXF97G1XqmYhm8LLKVAiLXccA%40mail.gmail.com.
Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.
Dnia 2020-02-20, o godz. 08:57:51
David Riley <frave...@gmail.com> napisał(a):
> I'm willing to be convinced otherwise. [...]
> a new "magic" tab that won't be supported
This proposal is not about some "magic tab". It is about a gofmt formatting recipe
that allows for minimal changesets while keeping "pretty" autoformatting of structs
intact. ("Smart tabs" were mentioned by Manilo in other thread. :)
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/7d8a430a-b1d9-4d69-9814-0c8e39b3546f%40googlegroups.com.
Here is an example of a diff with a lot of noise, where the actual change is very hard to see:Note that using `git diff -w` is not a solution, since it can only be used locally. The full diff will be shown by github and friends.