3 ms·
You are looking at the wrong thing. Nobody looks at bunched parentheses for any reason, unless they are investigating a suspicion that the code's indentation is
by kazinator 2y ago
You are looking at the wrong thing. Nobody looks at bunched parentheses for any reason, unless they are investigating a suspicion that the code's indentation is wrong. In that situation, all that matters is whether the bunch contains the correct number of parentheses, not which specific closers match which specific openers.
(foo
(bar
(baz (xyzzy arg))
(bar arg))
We know from the indentation that this is supposed to be a closed unit:
(bar
(baz (xyzzy arg))
But it needs three closing parens ))) not just )).
If this problem is not accidentally compensated by a ) in the wrong place elsewhere, this code will error out.
One simple thing you can do is just automatically reindent the whole block. The indentation will then match the incorrect parentheses and the problem will be clear. Undo the temporary reformatting and fix it.
- n8henrie 2y ago> One simple thing you can do is just automatically reindent the whole block. This is exactly the point of my comment -- the absence of an obvious / reasonable automatic formatter is the problem I'm pointing to.
- kazinator 2y agoIn Vim, use V to go into line-oriented visual selection mode. Move the cursor over the range of lines to be reindented and hit =.