在Xcode中有一个快捷方式使块注释? [英] Is there a shortcut to make a block comment in Xcode?

查看:148
本文介绍了在Xcode中有一个快捷方式使块注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写的是ANSI兼容的C代码,因此我不能使用行( // )注释。我使用Xcode。在Sublime Text和Eclipse中,我认为大多数其他IDE,有单独的键盘快捷键用于行注释和块注释( / ** / )。但是,我在Xcode中看不到 - 实际上,我甚至不会看到一个菜单选项添加块注释。是不是简单地不支持在Xcode?

I'm writing ANSI-compatible C code, and hence I can't use the line (//) comment. I'm using Xcode. In Sublime Text and Eclipse, and I think most other IDEs, there are separate keyboard shortcuts for line comments and block comments (/**/). However, I don't see that in Xcode - in fact, I don't even see a menu option to add a block comment. Is it simply not supported in Xcode? That would certainly seem to be a lame decision if so.

推荐答案

尝试命令 + / 。它适用于我。

Try command + /. It works for me.

因此,您只需突出显示要注释的代码块,然后按这两个键即可。

So, you just highlight the block of code you want to comment out and press those two keys.

这篇关于在Xcode中有一个快捷方式使块注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆