Whenever I use the Xcode keyboard shortcut Command + / for commenting line(s) of code in a Swift/Objective-C source file, the //
characters are always placed in the first column. I would much prefer it be at the current indentation.
I guess this is a personal preference, but does anyone know if there's config for it:
For e.g., If I have this code snippet:
...
print("something")
...
and I invoke the keyboard shortcut Command + / with the caret positioned on the line containing print
statement, I get:
...
// print("something")
...
I'd prefer the following behavior instead:
...
print("something")
...
I invoke the keyboard shortcut Command + / with the caret positioned on the line containing print
statement, I should get:
...
// print("something")
...
I guess this is a personal preference, but does anyone know if there's configuration for it?
Best Answer
You can use the Comment Here extension. After downloading: