每当我在Xcode中缩进某些代码行时,它总是将slash字符放在缩进之前的一开始。
之前:
if(0 == 0) {
NSLog(@"Some line of code");
NSLog(@"Another line of code");
}
之后:
if(0 == 0) {
// NSLog(@"Some line of code");
NSLog(@"Another line of code");
}
我想做的是像地球上所有其他文本编辑器一样,将"//"字符放在凹痕之后:
: if(0 == 0) {
//NSLog(@"Some line of code");
NSLog(@"Another line of code");
}
我该怎么做?
不幸的是,xcode中没有选项更改此操作,但是您可以在此处安装评论 xcode extension xcode扩展名。只需安装它并按照简单的说明进行设置即可。它对我来说很好!
https://apps.apple.com/us/app/comment-here/id1406737173?mt=12
-
'命令["直到您的文本附加到左侧
-
添加"//"(命令/)
-
最后'命令]"到原始位置。