Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
dmonkey2195313dDue to editors I do open-type-close, but on simple editors I do open-close-goback-type
-
TheBeardedOne3130313dI do both and move the cursor back. Editors and IDES seem to be so random about when they do and don't autocomplete
-
exerceo1194313dThe Xed text editor auto-inserts the second quotation mark, but does not skip it when pressing it the second time, so I have to skip around it.
-
netikras34814313dI do the pair first and then go back to fill the contents. Which is often annoying when typing " triggers ide to autocomplete with a second ", and when I automatically type the 2nd " I have """.
Some ides cope with that nicely by upserting the 2nd of the pair. Some don't -
Isirant19313dI always type both right away cause I'm on a shitty german keyboard layout where [] and {} are fucking hard to reach (right alt + 6, 7, 8, 9)
Also < and > are a fucking abomination. -
Lensflare17450313d@Isirant I know the pain and I lived with it for so many years until I finally decided to remap my keyboard to make it sane for coding. I got used to it much faster than I anticipated.
-
Root79750313dI type them when I need them. open-type-close
Honestly? I prefer typing them manually instead of having the editor automagically add them because it often does so in an annoying way, and fixing its mistakes takes more effort than if I just typed everything.
Some editors automatically add the closing bracket, but retain the cursor inside, which is nice. The better ones also allow overtyping that automatic closing bracket. Those are nice. It’s easy to confuse these, though, leading to doubled end quotes, for example. (or it doesn’t support all pairs like ``)
Other editors add both brackets when you type an opening character, but put your cursor after both of them — and delete both if you backspace to delete just the closing bracket. Pisses me off to no end.
Worse ones predict that you want a multi line snippet, and automatically insert it. Now your cursor is somewhere else and you have to parse what garbage it added so you can remove it — and then watch as it likely adds that same multi line snippet again. Ugh.
No thank you.
Open-type-close for me, tyvm! -
lorentz15174313dOpen-type-close most of the time, open-close-back-type specifically for generics / diamond brackets because they aren't colored so if the IDE miscounts them it's a bit harder to fix.
-
awesomeest1209311dI cant stand IDEs and most editors; i turn off the auto-close options for the few i use.
Open-contents-close always.
But i am aware that im a dinosaur with coding practices.
Related Rants
How do you type with pairs of characters like () [] <> "" etc.?
Do you type them both, then move the cursor back and type the stuff inside or do you type the first of the pair, then type the stuff inside and then close it with the second of the pair?
I just realized I do both techniques, apparently randomly, which weirds me out.
Also my IDE often places the second character of the pair automatically.
question
ide
typing