Delphi快捷键

Ctrl+F 进行搜索

快捷键描述IDE 版本
EscapeSelects parent control in design mode. Left mouse click + Escape drags the parent controlDelphi 2 and up
Shift + ClickAfter selecting control in form designer, click on it with Shift again to select top most parent FormDelphi 5 and up
TabIn Object Inspector activates incremental search for properties. Press again Tab to move focus to property valueDelphi 5 and up
Ctrl + JInvoke code templates also called code snippetsDelphi 5 and up
Ctrl + TDelete text from cursor position until end of wordDelphi 5 and up
Ctrl + EIncremental searchDelphi 5 and up
Ctrl + YDelete current lineDelphi 5 and up
Ctrl + BInvoke buffer window when focus is on editor. The buffer window shows a list of all different tabs.Delphi 2007 and up
Ctrl + Shift + GInsert a new GUID at the cursor positionDelphi 5 and up
Ctrl + Shift + IIndent the current selected blockDelphi 5 and up
Ctrl + Shift + UUnindent the current selected blockDelphi 5 and up
Ctrl + K + IIndent the current selected block or current line in case of no selectionDelphi 5 and up
Ctrl + K + UUnindent the current selected block or current line in case of no selectionDelphi 5 and up
Ctrl + Shift + JInvoke SyncEditBorland Developer Studio 2006
Ctrl + Shift + VAutomatically declare variable at cursor positionBorland Developer Studio 2006
Ctrl + Shift + YDelete to the end of lineDelphi 5 and up
Alt + [Match pair forwardDelphi 5 and up
Alt + ]Match pair backwardDelphi 5 and up
Alt + RightArrowBrowse forward (hotlink history)Delphi 7 and up
Alt + LeftArrowBrowse backward (hotlink history)Delphi 7 and up
Alt + UpArrowBrowse to symbol under editor cursor (invoke a hotlink and add it to the hotlink history)Borland Developer Studio 2006
F4Run program to current cursor positionDelphi 2 and up
F5Toggle breakpointDelphi 2 and up
F7Debugger step intoDelphi 2 and up
Shift - F7Trace into next source lineDelphi 5 and up
F8Debugger step overDelphi 2 and up
Shift - F8Run until returnDelphi 5 and up
F9Run program under debuggerDelphi 2 and up
Ctrl + F2Program ResetDelphi 5 and up
Ctrl + F7Evaluate/modifyDelphi 2005 and up
Ctrl + F5Add WatchDelphi 5 and up
Ctrl + F12View unitsDelphi 2 and up
Alt + GGoto line number in editorDelphi 2 and up
Ctrl + O + GGoto line number in editorDelphi 5 and up
Ctrl + Shift + RStart/stop recording editor macroDelphi 2 and up
Ctrl + Shift + PPlay editor macroDelphi 2 and up
Ctrl + SpacebarInvoke code completionDelphi 5 and up
Ctrl + Shift + SpacebarInvoke code parameter hintsDelphi 5 and up
Ctrl + EnterOpen file at cursorDelphi 2 and up
Ctrl + Shift + EnterFind all referencesDelphi 2005 and up
Ctrl + Shift + CInvoke class completion for the class that currently contains the cursorDelphi 5 and up
Ctrl + Shift + UpArrowNavigate to method implementation/declarationDelphi 5 and up
Ctrl + Shift + DownArrowNavigate to method implementation/declarationDelphi 5 and up
Ctrl + Alt + F12Opens the drop-down on the top-right corner of the code editor, listing all open filesBorland Developer Studio 2006
Ctrl + Alt + Mouse WheelNavigate to previous or next method implementation in lexical order in this source unit, or within the class to which scope has been limited using Ctrl+Q+LBorland Developer Studio 2006
Ctrl + Alt + UpArrowNavigate to previous method implementation in lexical order in this source unit, or within the class to which scope has been limited using Ctrl+Q+LBorland Developer Studio 2006
Ctrl + Alt + DownArrowNavigate to next method implementation in lexical order in this source unit, or within the class to which scope has been limited using Ctrl+Q+LBorland Developer Studio 2006
Ctrl + Alt + HomeNavigate to the lexically first method implementation in this source unit, or within the class to which scope has been limited using Ctrl+Q+LBorland Developer Studio 2006
Ctrl + Alt + EndNavigate to the lexically last method implementation in this source unit, or within the class to which scope has been limited using Ctrl+Q+LBorland Developer Studio 2006
Ctrl + Alt + PActivate the Tool Palette in filtering mode (start typing, press Enter to drop component)Delphi 2005 and up
Ctrl + /Toggle comment per line or selected block, Ctrl + ' on nordic (and perhaps other international ) keyboardsDelphi 2005 and up
Ctrl + Shift + TAdd todo list itemDelphi 2005 and up
Alt + F12Toggle between Form as text mode of design modeDelphi 5 and up
Alt + F11Invoke Use unit dialogDelphi 5 and up
Ctrl + F11Invoke Open Project DialogDelphi 2005 and up
Ctrl + Alt + F11Invoke Project manager windowDelphi 2005 and up
F11Invoke Object Inspector windowDelphi 5 and up
F12Toggle between code view and design viewDelphi 5 and up
Alt + 0Invoke Window listDelphi 2005 and up
Shift + Alt + F11Invoke Structure windowDelphi 2005 and up
Ctrl + Shift + BInvoke Browser windowDelphi 5
Ctrl + Alt + BInvoke Breakpoint windowDelphi 5 and up
Ctrl + Alt + SInvoke Call Stack windowDelphi 5 and up
Ctrl + Alt + WInvoke Watches windowDelphi 5 and up
Ctrl + Alt + LInvoke Local Variables windowDelphi 5 and up
Ctrl + Alt + TInvoke Threads windowDelphi 7 and up
Ctrl + Alt + FInvoke FPU windowDelphi 2005(removed from Delphi 2006)
Ctrl + Alt + CInvoke CPU windowDelphi 5 and up
Ctrl + Alt + VInvoke Event windowDelphi 5 and up
Ctrl + Alt + MInvoke Modules windowDelphi 2005 and up
Shift + F12Invoke Forms windowDelphi 5 and up
Ctrl + Shift + AInvoke Add to uses clause(Find unit in Delphi 2006) window (Refactoring)Delphi 2005 and up
Ctrl + Shift + F11Invoke Project Options windowDelphi 2005 and up
Ctrl + F9Compile ProjectDelphi 5 and up
Shift + F9Build ProjectDelphi 5 and up
Shift + F11Invoke Add to project windowDelphi 5 and up
Shift + Ctrl + F9Run without debuggingDelphi 2005 and up
Ctrl + FFindDelphi 3 and up
Shift + Ctrl + FFind in FilesDelphi 3 and up
Alt + F7/F8Previous/next result (for Find in Files and Messages)Delphi 7 and up
Ctrl+K+EChanges a word to lowercase and deselects selectionDelphi 5 and up
Ctrl+K+FChanges a word to uppercase and deselects selectionDelphi 5 and up
Ctrl+K+OChanges a word to lowercaseDelphi 5 and up
Ctrl+K+NChanges a word to uppercaseDelphi 5 and up
Ctrl+O+UToggles caseDelphi 5 and up
Ctrl+Shift+K+OToggles Code folding between On and OffDelphi 2006 and up
Ctrl+Shift+K+ACode folding: Expands All blocks of codeDelphi 2006 and up
Ctrl+Shift+K+ECode folding: Collapse current block of codeDelphi 2006 and up
Ctrl+Shift+K+UCode folding: Expand current block of codeDelphi 2006 and up
Ctrl+Shift+K+TCode folding: Toggle Current block (expand & collapse)
Ctrl+Shift+K+RCode folding: Collapses all regions {$region 'comment'}..{$endregion}Delphi 2006 and up
Ctrl+Shift+K+PCode folding: Collapse nested procedures
Ctrl+Shift+K+MCode folding: Collapse all methods
Ctrl+Shift+K+CCode folding: Collapse all classes
Ctrl+Shift+K+GCode folding: Collapses down to primary Groups [Interface/Implementation]Delphi 2006 and up
Ctrl+Shift+K+NCode folding: Collapses Namespace/UnitDelphi 2006 and up
Ctrl+TabSwitch to the next open file in the editorDelphi 2006 and up
Ctrl+Shift+TabSwitch to the previous open file in the editorDelphi 2006 and up
Ctrl + K + PInvokes print selection dialogDelphi 5 and up
Ctrl + K + WInvokes Write block to file(selected text)Delphi 5 and up
Ctrl + K + RInvokes Read block from file(inserts text at cursor)Delphi 5 and up
Ctrl + K + CCopies selected text at the end of the selectionDelphi 5 and up
Ctrl + K + TSelect word at cursor positionDelphi 5 and up
Ctrl + O + LSelects current lineDelphi 5 and up
Ctrl + Q + LToggles between limiting the Ctrl+Alt navigation shortcuts to the current class, or limiting it to the current unitBorland Developer Studio 2006
Ctrl + Q + WGo to next item of Messages windowDelphi 5 and up

Ctrl+PageUp 将光标移至本屏的第一行,屏幕不滚动。

Ctrl+PageDown 将光标移至本屏的最后一行,屏幕不滚动。

Ctrl+↓ 向下滚动屏幕,光标跟随滚动不出本屏。

Ctrl+↑ 向上滚动屏幕,光标跟随滚动不出本屏。

Ctrl+Shift+NUM 在光标行设置最多九个临时标志号,对临时切换非常有用。行的左边将出现一本书,封面有NUM,再按一次取消设置。

Ctrl+NUM 直接将光标跳到NUM处,NUM是用Ctrl+Shift+NUM设置的标号。 NUM不能用小键盘。

Ctrl+Home 将光标移至文件头。

Ctrl+End 将光标移至文件尾。

Ctrl+B Buffer List窗口。

Ctrl+I 同Tab键。

Ctrl+M 同Enter键。

Ctrl+N 同Enter键,但光标位置保持不变。

Ctrl+T 删除光标右边的一个单词。

Ctrl+Y 删除光标所在行。

Ctrl+Shift+↑ 光标在函数体内时,将光标快速移至当前函数声明处。

Ctrl+Shift+↓ 光标在函数声明行时,将光标快速移至函数定义处。

Ctrl+Shift+C 声明一个过程或函数后,直接生成过程或函数的名称、begin、end;

Ctrl+Shift+E 光标在Edit窗口和Explorer窗口间切换。

Ctrl+Shift+G 插入GUID。

Ctrl+Shift+J 弹出Delphi语句提示窗口,选择所需语句将自动完成一条语句。

Ctrl+Shift+T 在光标行加入To-Do注释。

Ctrl+Shift+Y 删除光标之后至本行末尾之间的文本。

Ctrl+F3 Call Stack窗口。

Ctrl+F4 等于File菜单中的Close项。

Ctrl+鼠标转轮 加速滚屏。

Shift+F8 调试时弹出CPU窗口。

Shift+F10 等于鼠标右键(Windows快捷键)。

Alt+F4 关闭所有编辑框中打开的源程序文件,但不关闭项目。

设置Code Insight 模板,begin...end,以后只要输入be,然后按ctrl+j就可以匹配begin,end;但是从begin到相应的end,就不知道了,匹配括号之类的可以用alt+[,Alt+]

搜索editor keyboard shortcuts可能可以找到,你自己看帮助吧。

在编程序时 unit 右键菜单的properties /Code Insight 设置你喜欢的任何东东 ctr+j即可。

DELPHI IDE中部分操作快捷方式(大部分在Delphi 5.0的菜单中找不到,其中有一些还是非常有用的)

  1 代码模板:CTRL+J

  2 代码整块移动:CTRL+SHIFT+I(右移) CTRL+SHIFT+U(左移)

  3 选中窗体 : 先选中任一控件,SHIFT+鼠标左键

  4 将鼠标指向变量名、单元名、类名,再用 CTRL+鼠标左键 可找到相应的说明

  5 在过程、函数、事件内部, SHIFT+CTRL+向上的方向键 可跳跃到相应的过程、函数、事件的定义

  6 相反,在过程、函数、事件的定义处,SHIFT+CTRL+向下的方向键 可跳跃到具体过程、函数、事件内部

  7 CTRL+ SHIFT + C:编写申明或者补上函数

  8 SHIFT+CTRL+E 显示 EXPLORER

  9 Ctrl+ shift + n (n=1,2,3,4......)定义书签

  10 Ctrl+ n (n=1,2,3,4......)跳到书签n

  11 ALT+鼠标左键可以块选代码,删除对齐的重复代码非常有用

  12 Ctrl+PageUp 将光标移至本屏的第一行,屏幕不滚动。

  13 Ctrl+PageDown 将光标移至本屏的最后一行,屏幕不滚动。

  14 Ctrl+↓ 向下滚动屏幕,光标跟随滚动不出本屏。

  15 Ctrl+↑ 向上滚动屏幕,光标跟随滚动不出本屏。

  16 Ctrl+Home 将光标移至文件头。

  17 Ctrl+End 将光标移至文件尾。

  18 Ctrl+B Buffer List窗口。

  19 Ctrl+I 同Tab键。

  20 Ctrl+M 同Enter键。

  21 Ctrl+N 同Enter键,但光标位置保持不变。

  22 Ctrl+T 删除光标右边的一个单词。

  23 Ctrl+Y 删除光标所在行。

  24 Ctrl+Shift+↑ 光标在函数体内时,将光标快速移至当前函数声明处。

  25 Ctrl+Shift+↓ 光标在函数声明行时,将光标快速移至函数定义处。

  26 Ctrl+Shift+C 声明一个过程或函数后,直接生成过程或函数的名称、begin、end;

  27 Ctrl+Shift+E 光标在Edit窗口和Explorer窗口间切换。

  28 Ctrl+Shift+G 插入GUID。

  29 Ctrl+Shift+J 弹出Delphi语句提示窗口,选择所需语句将自动完成一条语句。

  30 Ctrl+Shift+T 在光标行加入To-Do注释。

  31 Ctrl+Shift+Y 删除光标之后至本行末尾之间的文本。

  32 Ctrl+F3 Call Stack窗口。

  33 Ctrl+F4 等于File菜单中的Close项。

  34 Ctrl+鼠标转轮 加速滚屏。

  35 Shift+F8 调试时弹出CPU窗口。

  36 Shift+F10 等于鼠标右键(Windows快捷键)。

  37 Alt+F4 关闭所有编辑框中打开的源程序文件,但不关闭项目