4 ms·
> It doesn't really solve the problem. How do you format this code with tabs: <TAB><TAB>function name(arg1, arg2, <TABs or spaces?????> arg3 <-- align wi
by ggregoire 7y ago
> It doesn't really solve the problem. How do you format this code with tabs:
<TAB><TAB>function name(arg1, arg2,
<TABs or spaces?????> arg3 <-- align with arg1)
Just wondering… do you realign the parameters every time you rename a function?
- samvher 7y agoNot 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.
- mikewhy 7y ago<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.
- jlokier 7y agoThat 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);
- benibela 7y agoIf the editor would support elastic tabstops you could do: <TAB><TAB>function name(<TAB>arg1, arg2, <TAB><TAB><TAB>arg3)
- deleted 7y ago[deleted]
- jcranmer 7y agoI don't actually personally do this kind of alignment, but it was the easiest example for me to come up with to illustrate the problem of needing to align text on different lines.