How is it ever wrong, though? If I insert a (, and then a {, and the editor appends so that it's ({}), that's always ?correct. Can it ever not be.
Maybe because on a Norwegian keyboard { is a bit awkward, but I like it. Then even if we're 5 levels deep with useEffect(() => {(({[{[ I can just press ctrl+shift+enter and it just magically finishes up everything and put my caret at the correct place, instead of me trying to write ]}]})) in the correct order.
Whenever you edit something existing that already has the ), ] or } further down and you end up with a ()), []] or {}}. Or when you select some text that you want to replace and start with a quote only to end up with "the text you wanted to replace" instead of the expected ".
I never notice when it works but get annoyed every time it doesn't, so I feel like it never works and always sucks.
I guess it's muscle memory and some people are used to it, but it feels fundamentally wrong to me to have the editor do different basic editing things based on which character is being pressed.
Most editors are not smart enough to do it consistently right. For example, VS Code often inserts extra quotes when I try to break "long string" into "long " + something() + " string". And when I try to write a half-open interval [a, b) in a comment or within a string, the editor inserts an extra ].
It certainly can, because it doesn't necessarily know where the closing brace should be, especially when inserting as opposed to writing a completely new line. I'm often deleting random crap in the editors I use with the 'feature' as I'm adding delimiters. '"' tends to be even worse, because the distinction between opening and closing is not obvious.
e.g.:
(a + b > c) -> ((a + b > c) -> (()a + b > c) -> no, I was aiming for ((a + b) > c)
(it sound like you're talking about a different feature/implementation, though, since in the annoying case there's no 'completion' shortcut, it just appears)
> can just press ctrl+shift+enter and it just magically finishes up everything and put my caret at the correct place, instead of me trying to write ]}]})) in the correct order.
I think here you are talking about a different thing -- completion of already started parentheses/"/whatever with content in-between, not the pre-application of paired braces or quotation marks, as the author did, no?
How is it ever wrong, though? If I insert a (, and then a {, and the editor appends so that it's ({}), that's always ?correct. Can it ever not be.
Maybe because on a Norwegian keyboard { is a bit awkward, but I like it. Then even if we're 5 levels deep with useEffect(() => {(({[{[ I can just press ctrl+shift+enter and it just magically finishes up everything and put my caret at the correct place, instead of me trying to write ]}]})) in the correct order.