评论快捷方式 Android Studio [英] Comment shortcut Android Studio
问题描述
我正在寻找有用的 Android Studio 键盘快捷键来评论代码,如 Sublime Text 或 Eclipse.
I'm searching for useful Android Studio keyboard shortcut for commenting code, as in Sublime Text or Eclipse.
当我按下 cmd+/ 或 cmd+maj+/ 什么都没发生...
When I press either cmd+/ or cmd+maj+/ nothing happens...
推荐答案
Mac With Numeric pad
行注释同时保留:Cmd + /
阻止评论 保留所有三个:Cmd + Alt + /
Block Comment hold all three: Cmd + Alt + /
行注释同时保留:Cmd + + =
Block Comment 保留所有三个:Cmd + Alt + + =
Block Comment hold all three: Cmd + Alt + + =
行注释同时保留:Ctrl + /
阻止评论 保持所有三个:Ctrl + Shift + /
Block Comment hold all three: Ctrl + Shift + /
删除注释块的方法相同.
Same way to remove the comment block.
提供方法文档注释 键入 /**
并在方法名称正上方按 Enter (
To Provide Method Documentation comment type /**
and press Enter just above the method name (
它将创建一个带有参数列表和返回类型的块注释
It will create a block comment with parameter list and return type like this
/**
* @param userId
* @return
*/
public int getSubPlayerCountForUser(String userId){}
这篇关于评论快捷方式 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!