Hacker News new | ask | show | jobs
by stavros 848 days ago
Conversely, my strategy is "press shift+tab to close the block and not have to screw around with matching {} everywhere".
2 comments

But that leaves you having to manually adjust entire blocks, when indentation levels change. With {}, prettier can readjust everything properly for you, even after mutilating changes such as copying an entire block from a different file into a new one, and at a different indentation level.
Python formatters do that too, they don't care about the indentation, as long as it's consistent. All I need to do is indent the block far enough to the right that it's not more left than the previous one, and that's it.

This also happens rarely enough that it's never been an issue for me.

I find selecting a block of code and hitting tab/shift+tab much simpler and faster than hunting down matching parenthesis, especially when adjusting longer sections or complex situations.

Of course this is mostly a tooling issue, since there is a shortcut for adjusting indentation but not for adjusting parenthesis. Or maybe there is and I just haven't discovered it yet.

Perhaps is because jetbrains make better structural editing than vscode, but I practically never have to type closing brackets.

Copying, moving, reordering, newlines, pretty much anything will keep correct pairing of brackets.

Sure, and I never have to type any opening indentation either, only closing.

Regardless, to me, this is such a minor issue that I don't consider it at all when choosing a language.