3 ms·
I find that line wrapping frequently prevents me from getting complete coverage though. So it works for some cases, not for others. But I do love auto-formatte
by paulddraper 7y ago
I find that line wrapping frequently prevents me from getting complete coverage though. So it works for some cases, not for others.
But I do love auto-formatters. (I'm doing web dev at the moment, so Prettier.) It is freeing to not worry about spacing, line breaks, parens, etc.
All I have to do is give the computer a valid AST and it does The Right Thing.
- jandrese 7y agoIsn't this what the /s flag is for in your regex? Assuming you are also using /x of course.
- paulddraper 7y agoSort of. But there's indentation, so I need repetition. And if I'm doing whitespace repetition, there's no great advantage in an autoformatter.
- jandrese 7y agoYou do have to be more liberal with '\s*' or '\s+' instead of just ' ' in your patterns, that is true.