In Xcode (swift file), I'm facing an issue where automatic insertion of closing brace is not working anymore.
Ex: when I write
func myFunc() {
and hit Enter, Xcode will not insert the closing brace, and I need to do it by myself (and I'm very angry about it...)
Yet, my settings seem to be good: Preferences -> Text Editing tab -> "automatically insert closing braces" == true
It seems to happen for each file containing commented code, especially this (very common) piece of comment : //}
Configuration: Xcode Version 10.0 (10A255)
Steps to reproduce on a new Playground:
//}
func test() {
It definitely seems to be a bug in the text editor. Already filed with Apple bug reporter.
Can everyone reproduce the bug or is it due to some configs ? And if so, what can I do to fix it ?
I'm using Xcode 10.3. I've discovered if I have comment blocks in a file, then Xcode won't auto insert a closing bracket in that file.
/*
Temporary fix. Replace this...
*/
//
// ...with this
//
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With