XCode实用快捷键

yihaoxue 2011-08-13

整理了常用的Xcode快捷键,工欲善其事,必先利其器。

新建项目 command+shift+n

新建文件command+n

新建空文件command+control+n

打开command+o

关闭窗口command+w

保存所有文件command+option+s

还原到保存时状态command+u

创建快照command+control+s(保存文件快照,以后可进行对比修改情况)

左缩进command+[

右缩进command+]

项目中查找command+shift+F

查找下一个command+g

查找上一个command+shift+g

用选择的查找command+e

gotolinecommand+l

下一个填充control+.

填充列表option+esc

显示拼写和语法command+shift+;

检查拼写command+;

打开头文件command+shift+d

切换头/源文件command+option+上箭头

类浏览command+shift+c

BulidandRun断点关command+r

BuildandDebug断点开command+y

下个Build警告或错误command+=

前个Build警告或错误command+shift+=

注释command+/

文件首行command+上箭头

文件末command+下箭头

行首command+左箭头

行末command+右箭头

上一单词option+左箭头

下一单词option+右箭头

中间显示光标位置control+l

方法组列表control+2

删除此行光标前所有内容control+delete

断点 command+option+b

当前行插入断点command+\

Pausecommand+option+p

StepIntocommand+shift+i

StepIntoInstructioncommand+option+shift+i

StepOvercommand+shift+o

SetpOverInstructioncommand+option+shift+o

Setp Out command+shift+t

查开发文档 command+option+click

 

整理了一下Xcode快捷键,史上最全!

xcode相关:

关于xcode可设

偏好设置command+,

清空缓存可设

隐藏xcodecommand+h

隐藏其它command+option+h

显示全部可设

退出xcode command+q

文件相关:

新建项目command+shift+n

新建文件command+n

新建空文件command+control+n

打开command+o

在新窗口中打开command+option+o

快速打开command+shift+d/command+shift+alt+d(不知区别是什么)

清空最近打开文件可设

清空最近打开项目可设

GetInfocommand+i

显示检查器?command+option+i(效果和GetInfo一样,不知区别)

关闭窗口command+w

关闭所有窗口command+option+w

关闭当前项目command+control+w

关闭当前文件command+shift+w

保存文件command+s

保存所有文件command+option+s

另存为command+shift+s

复本另存为command+option+shift+s

还原到保存时状态command+u

创建快照command+control+s(保存文件快照,以后可进行对比修改情况)

显示快照可设(File->Snapshots)

打印command+p

编辑相关:

撤销command+z

重复command+shift+z

剪切command+x

复制command+c

粘贴command+v

粘贴并匹配格式command+option+shift+v

删除可设

全选command+a

复制(Duplicate)可设

重构command+shift+j(选中方法名)

转换为objc2.0可设

=================字体====================

显示字体command+t

粗体可设

斜体可设

下划线可设

变大字号可设

变小字号可设

Kern相关可设

Ligature相关可设

Baseline相关可设

显示颜色可设

复制样式command+option+c

粘贴样式command+option+v

=================文本====================

左对齐command+{

右对齐command+}

居中command+竖线(不知竖线是哪个,没试出)

Justify可设(功能未知)

左缩进command+[

右缩进command+]

ShowRuler可设(功能未知)

CopyRulercommand+control+c

PasteRulercommand+control+v

Balance可设(第一次,选中语句,第二次,选中方法体)

重置缩进可设

=================查找====================

项目中查找command+shift+F

在项目中查找选定文本可设

查找可设

查找替换command+control+f

查找选定文本可设

查找下一个command+g

查找上一个command+shift+g

隐藏查找栏可设

替换可设

替换全部可设

替换并查找下一个可设

替换并查找上一个可设

用选择的查找command+e

用选择的替换command+control+e

跳到光标处command+j

跳到定义可设

=================排序====================

按名可设

按类型可设

========================================

添加书签command+d

gotolinecommand+l

下一个填充control+.

填充列表option+esc

下一个占位符control+/(和tab相同)

EditAllinScopecommand+control+t(功能未知)

================插入宏=================

c

c++

html

java

objective-c

宏规范

=================拼写====================

显示拼写和语法command+shift+;

检查拼写command+;

输入时检查拼写可设

特殊符号command+option+t

视图相关:

右上角详情搜索command+option+f

缩放编辑窗口command+shift+e

缩放编辑窗口满屏command+option+shift+e

折叠command+control+左箭头

屏开command+control+右箭头

屏开所有control+u

折叠方法command+control+上箭头

展开方法command+control+下箭头

折叠注释块command+control+shift+上箭头

展开注释块command+control+shift+下箭头

焦点跟随command+option+control+f

==============信息提示====================

隐藏问题command+shift+h

所有问题可设

仅错误和警告可设

仅错误可设

仅Analyzer结果可设

显示断点可设

==================文本====================

tab设置可设

是否自动换行显示可设

行结束可设

显示控制字符command+shift+6

显示空格可设

==============智能分组====================

所有文件可设

Targets可设

Exeutables可设

书签command+shift+m

Symbols可设

搜索结果可设

===================布局====================

显示导航栏可设

隐藏状态栏可设

显示收藏栏可设

显示页数控制可设

===========================================

前进command+option+右箭头

下一文件command+option+shift+右箭头

返回command+option+左箭头

上一文件command+option+shift+左箭头

切换头/源文件command+option+上箭头

组树中定位command+option+shift+上箭头

显示工具栏可设

自定义工具栏可设

===================项目====================

项目中标签切换command+数字0

类浏览command+shift+c

重命名项目可设

新组command+option+n

分组command+option+g

撤销分组command+option+shift+g

新建智能组可设

添加项目command+option+a

添加文件到项目可设

新Target可设

升级所有Targets可设

升级当前Target到ipad可设

================NewBuildPhase====================

没做测试不多介绍,只放出内容

NewCopyFilesBuildPhase

NewRunScriptBuildPhase

NewCopyHeadersBuildPhase

NewCopyBundleResourcesBuildPhase

NewCompileSourcesBuildPhase

NewLinkBinaryWithLibrariesBuildPhase

NewBuildJavaResourcesBuildPhase

NewBuildResourceManagerResourcesBuildPhase

================================================

新的自定义可执行文件可设

设置当前Target为空可设

SetActiveArchitecture为空可设

设置当前sdk为空可设

设置Build配置为空可设

SetActiveExecutable为空可设

编辑项目设置可设

编辑当前Targetcommand+option+e

编辑当前可执行文件command+option+x

===================Build========================

BulidResultscommand+shift+b

Bulidcommand+b

BuildandAnalyzecommand+shift+a

BuildandArchive可设

BuildandDebugcommand+enter

BulidandRun断点关command+r

BuildandDebug断点开command+y

Cleancommand+shift+k

CleanAllTargets可设

下个Build警告或错误command+=

前个Build警告或错误command+shift+=

Compilecommand+k

Preprocess可设

ShowAssemblyCode可设

Touch可设

=======================代码导航及编辑================

注释command+/

文件首行command+上箭头

文件末command+下箭头

行首command+左箭头

行末command+右箭头

上一单词option+左箭头

下一单词option+右箭头

上一拆分单词control+左箭头

下一拆分单词control+右箭头

中间显示光标位置control+l

方法组列表control+2

删除前一单词option+delete

删除此行光标前所有内容control+delete

跨行选取 command+option+鼠标拖动

Run相关:

Debug command+option+enter

Run断点关command+option+r

Debug断点开command+option+y

RunwithPerformanceTool(Shark)可设

Stopcommand+shift+enter

AttachtoProcess(ProcessID)可设

Debuggercommand+option+y

MiniDebuggercommand+control+左斜上箭头(不知咋按)

Consolecommand+shift+r

ClearConsolecommand+option+control+r

===================Show========================

断点command+option+b

Expressions可设

GlobalVariables可设

MemoryBrowsers可设

SharedLibraries可设

===================DebuggerDisplay========================

纵布局可设

横布局可设

Datatips可设

StepControls可设

SourceOnly可设

SourceAndDisassembly可设

Disassembly可设

===================VariablesView========================

UserDataFormatters

ShowTypeColumn

PrintDescriptiontoConsole

PrintRootstoConsole

PrintRefererstoConsole

WatchVariable

ViewValueas

Natural

Hexadecimal

OSType

Decimal

UnsignedDecimal

Octal

Binary

EditValue

EditSummaryFormat

ViewinMemoryBrowser

ViewinWindow

ViewinExpressionsWindow

===============================================

停用断点command+control+\

停止objc例外可设

================ManageBrakpoints=================

当前行插入断点command+\

AddSymbolicBreakpoint可设

AddC++ExceptionBreakpoint可设

启用当前行断点command+option+\

导入断点可设

导出断点可设

===============================================

Fix可设

Pausecommand+option+p

StepIntocommand+shift+i

StepIntoInstructioncommand+option+shift+i

StepOvercommand+shift+o

SetpOverInstructioncommand+option+shift+o

SetpOutcommand+shift+t

NextThreadcommand+option+control+上箭头

PreviousThreadcommand+option+control+下箭头

SyncwithDebugger可设

StoponDebugger()/DebugStr()可设

Enable Guard Malloc 可设

Desing相关:

======================ClassModel===================

QuickModel

GotoDeclaration

GotoDefinition

GotoDocumentation

AddComment

======================DataModel===================

Import

AddModelVersion

SetCurrentVersion

AddEntity

AddAttributecommand+control+a

AddFetchedProperty

AddRelationshipcommand+control+r

AddFetchRequest

CopyMethodDeclarationstoClipboard

CopyMethodImplementationstoClipboard

CopyObj-C2.0MethodDeclarationstoClipboard

CopyObj-C2.0MethodImplementationstoClipboa

======================MappingModel===================

UpdateSourceModel

UpdateDestinationModel

AddMissingPropertyMappings

===================================================

ShowModelBrowsercommand+control+b

CollapseCompartments

ExpandCompartments

RollUpCompartments

RollDownCompartments

======================Diagram=======================

BringtoFrontcommand+control+shift+f

SendtoBackcommand+control+shift+b

AlignTopEdges

AlignBottomEdges

AlignLeftEdges

AlignRightEdges

AlignVerticalCenters

AlignHorizontalCenters

MakeCenteredColum

MakeCenteredRow

MakeSameWidth

MakeSameHeight

SizetoFit

Lockcommand+control+l

Unlockcommand+shift+control+l

Zoomincommand+control++

ZoomOutcommand+control+-

ZoomtoFitcommand+control+=

TurnGridOn

ShowGrid

ShowPageBreaks

Force-DirectedLayoutcommand+control+g

HierarchicalLayoutcommand+control+h

Window相关:

最小化command+m

全部最小化command+option+m

Zoom

BringAlltoFront

Defaults

Organizercommand+control+o

Activity

Help相关:

开发文档command+option+?

快速帮助command+control+?

Xcode帮助command+?

WelcometoXcode

XcodeQuickStart

XcodeReleaseNotes

FindDocumentationforSelectedText

Open man Page

转自: http://www.cnblogs.com/ylucy

相关推荐

APCDE / 0评论 2019-12-01
野生的世界 / 0评论 2015-10-29