Re:Joining the Church of Emacs
by patrick451 on Sunday October 02, 2022 @10:21PM
(#33062800)
I found it amusing his example of badly formatted code
is exactly how most modern linters want to format my code.
[ Parent
| on HN ]
In IDEs that support refactor-renaming (Emacs probably does?), the column-aligned formatting also has the drawback that it breaks (unless the refactoring also auto-realigns all affected code).
For example,
one = 1
fortyTwo = 42
elite = 1337
might become: one = 1
ultimateAnswer = 42
leet = 1337
This made me stop column-aligning in most cases. An exception is array initializers for two-dimensional tables with many columns, where the benefit is important enough.It also makes git blame a lot less useful in these scenarios.
You can pass git blame -w to ignore whitespace changes, though yes, in general it is annoying.
I wouldn't have made this comment if I knew that. Though I suppose this is still an annoyance for git web interfaces. Thanks for the info!
Re:Joining the Church of Emacs
by how_gauche on Monday October 03, 2022 @08:20AM
(#33066450)
On GitHub you can add ?w=1 to diff URLs to get the same thing (there's a button for it too?)