Reputation: 8675
The default behaviour for the Xcode comment keyboard shortcut is to place // at the far left of the selected lines regardless of indentation.
I'd like to change this so that the indentation is taken into account and the // is inserted just before the text to comment.
For example:
class MyClass {
func myFunc() {
// cmd-/ does this
// I want cmd-/ to do this
}
}
Is this possible?
Upvotes: 10
Views: 521
Reputation: 5947
You can use the Comment Here extension. After downloading:
Upvotes: 5