4 ms·
I've recently been getting used to using line wrapping in VSCode (Alt+Z) and it's been working great. I only wish it was a bit more "semantic", similar to runni
by 0-_-0 6y ago
I've recently been getting used to using line wrapping in VSCode (Alt+Z) and it's been working great. I only wish it was a bit more "semantic", similar to running a linter with a specified width rather than just copying the indentation of the previous line, so that e.g. when I need to wrap a line that's a comma separated list (e.g. function parameters) it lines up the list elements in 1 column:
def f(
a,
b,
c,
d
):
- Roboprog 6y agoI like it, but then I have adopted a style very similar to that in the last 3 or 4 years: format expressions to approximate their syntax tree, with closing symbols aligned with the line that opened the sub-tree. Essentially, K&R indentation for ALL grouping symbols, not just curly braces. This way, lines are never very long anyway. Well, especially since my JS code has more of a “Ruby, with a dash of Lisp” style than a “Java” style.
- Roboprog 6y agoAs to vertical size: how much crap are you going to put into one function, anyway? Other than perhaps some local (nested) helper functions.