Re:Why I’m Leaving Elm
by ggregoire on Thursday April 09, 2020 @12:23PM
(#22824087)
> It doesn't really solve the problem. How do you format this code with tabs:
Just wondering… do you realign the parameters every time you rename a function?
[ Parent
| on HN ]
<TAB><TAB>function name(
<TAB><TAB><TAB>arg1,
<TAB><TAB><TAB>arg2,
<TAB><TAB><TAB>arg3,
<TAB><TAB>)
That means this never comes up, and you don't need to change adjacent lines because you've renamed a function.That wastes a lot of vertical space if you have a lot of function calls. If you're one of those who prefer that, it's ok. I much prefer:
function name(arg1, arg2, arg3,
arg4, arg5, arg6);Not the person you're responding to but I do, or actually spacemacs does. The sequence would be $ -> J -> i -> ENTER -> ESC and I guess it's muscle memory.
I agree that this kind of indentation might not make sense on a collaborative project because different people have different standards, but if I'm the only one working on a piece of code I really think precise alignment makes the code a lot more readable.
If the editor would support elastic tabstops you could do:
<TAB><TAB>function name(<TAB>arg1, arg2,
<TAB><TAB><TAB>arg3)