您经常使用哪些 Xcode 键盘快捷键?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1402174/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What Xcode keyboard shortcuts do you use regularly?
提问by Umair
What Xcode keyboard shortcuts do you use regularly?
您经常使用哪些 Xcode 键盘快捷键?
I am a huge believer in using the keyboard as much as possible (its much faster that way), and I was hoping others could share some of the Xcode shortcuts they use.
我非常相信尽可能多地使用键盘(那样会快得多),我希望其他人可以分享他们使用的一些 Xcode 快捷键。
回答by Robert
I find the shortcuts to open & close various areas of the screen must useful.
我发现打开和关闭屏幕各个区域的快捷方式一定很有用。
回答by Ludvig A. Norin
Cmd+ Shift+ oopens the "Open quickly" dialog, where you can quickly find and open files that contain the text you enter.
Cmd+ Shift+o打开“快速打开”对话框,在这里可以快速找到并包含您所输入的文本打开的文件。
回答by Darren
回答by Andy
command+ shift+ j
command+ shift+j
Reveals the current file in the project navigator. Very useful if you use command+ control+ Jto jump to a definition as Xcode won't automatically reveal the containing file in the navigator.
在项目导航器中显示当前文件。如果你使用非常有用command+ control+J跳转到一个定义的Xcode不会自动显示在导航器中包含的文件。
回答by Sanjay Chaudhry
command/
command/
Comment out the current line, or multiple lines if they're highlighted.
注释掉当前行,如果高亮显示多行。
Comes in handy for quick commenting and uncommenting while experimenting with code.
在试验代码时可以方便地进行快速注释和取消注释。
回答by jbrennan
Re-indent. It's in Edit > Format > Re-Indent
and there's no shortcut by default (I use Command+ Shift+ L). It's a godsend.
重新缩进。它在Edit > Format > Re-Indent
默认情况下没有快捷方式(我使用Command+ Shift+ L)。这是天赐之物。
回答by Sanjay Chaudhry
commandFSearch in the File
commandF在文件中搜索
optioncommandFSearch & Replace in the File
optioncommandF在文件中搜索和替换
shiftcommandFSearch in the whole project
shiftcommandF在整个项目中搜索
shiftoptioncommandFSearch & Replace in the whole project
shiftoptioncommandF在整个项目中搜索和替换
Notice the pattern for easy memorizing.
注意图案以便于记忆。
回答by BlackTigerX
Ctrl+ Command+ ↑- Switch between header and implementation files.
Ctrl+ Command+ ↑- 在头文件和实现文件之间切换。
回答by Jian
Command+ J(Move focus to any section of the editor)
Command+ J(将焦点移到编辑器的任何部分)
回答by Sanjay Chaudhry
Control+ Command+ j
Control+ Command+j
Highlight a keyword (method name) and jump to its definition. Also works for variables, #defines, etc.
突出显示关键字(方法名称)并跳转到其定义。也适用于变量、#defines 等。