快捷键
在IDE中使用快捷键比使用鼠标更为高效。下表给出CodeBolcks默认的快捷键。(译者注:笔者将CodeBlocks中的快捷键
设置为与VS大体一致,使用CodeBlocks时非常顺手。)
Function
Shortcut Key
Undo last action
Ctrl + Z
Redo last action
Ctrl + Shift +Z
Cut selected text
Ctrl + X
Copy selected text
Ctrl +C
Paste text from clipboard
Ctrl +V
Select all text
Ctrl + A
Swap header / source
F11
Comment highlighted code
Ctrl +Shift + C
Uncomment highlighted code
Ctrl+ Shift + X
Duplicate line caret is on
Ctrl+ D
Auto-complete /Abbreviations
Ctrl + Space /Ctrl + J
Show call tip
Ctrl + Shift +Space
Swap line caret is on with line aboveit
Ctrl + T
Toggle bookmark
Ctrl + B
Goto previous bookmark
Alt +PgUp
Goto next bookmark
Alt +PgDown
Toggle current blockfolding
F12
Toggle all folds
Shift +F12
CodeBlocks 代码 编辑器组件提供的快捷键,这些快捷键不能重新绑定(rebound)。
Function
Shortcut Key
Magnify text size.
Ctrl + Keypad"+"
Reduce text size.
Ctrl + Keypad"-"
Restore text size tonormal.
Ctrl + Keypad "/"
Cycle through recent files.
Ctrl+ Tab
Indent block.
Tab
Dedent block.
Shift + Tab
Delete to start of word.
Ctrl +BackSpace
Delete to end of word.
Ctrl +Delete
Delete to start of line.
Ctrl +Shift + BackSpace
Delete to end of line.
Ctrl +Shift + Delete
Go to start of document.
Ctrl +Home
Extend selection to start ofdocument.
Ctrl + Shift +Home
Go to start of display line.
Alt+ Home
Extend selection to start of displayline.
Alt + Shift + Home
Go to end of document.
Ctrl +End
Extend selection to end ofdocument.
Ctrl + Shift +End
Go to end of display line.
Alt +End
Extend selection to end of displayline.
Alt + Shift + End
Expand or contract a foldpoint.
Ctrl + Keypad "*"
Create or delete abookmark.
Ctrl + F2
Go to next bookmark.
F2
Select to next bookmark.
Alt +F2
Find selection.
Ctrl + F3
Find selection backwards.
Ctrl +Shift + F3
Scroll up.
Ctrl + Up
Scroll down.
Ctrl + Down
Line cut.
Ctrl + L
Line copy.
Ctrl + Shift +T
Line delete.
Ctrl + Shift +L
Line transpose withprevious.
Ctrl + T
Line duplicate.
Ctrl + D
Find matching preprocessor conditional, skipping nestedones.
Ctrl + K
Select to matching preprocessorconditional.
Ctrl + Shift +K
Find matching preprocessor conditional backwards, skipping nestedones.
Ctrl + J
Select to matching preprocessor conditionalbackwards.
Ctrl + Shift +J
Previous paragraph. Shift extendsselection.
Ctrl + [
Next paragraph. Shift extendsselection.
Ctrl + ]
Previous word. Shift extendsselection.
Ctrl + Left
Next word. Shift extendsselection.
Ctrl + Right
Previous word part. Shift extendsselection.
Ctrl + /
Next word part. Shift extendsselection.
Ctrl + \
Files
Function
Shortcut Key
New file or project
Ctrl +N
Open existing file orproject
Ctrl + O
Save current file
Ctrl + S
Save all files
Ctrl + Shift +S
Close current file
Ctrl + F4 /Ctrl + W
Close all files
Ctrl + Shift +F4 / Ctrl + Shift + W
CodeBlocks的Tab组件所提供的快捷键,这些快捷键不能重新绑定(rebound)。
Function
Shortcut Key
Activate next open file
Ctrl +Tab
Activate previous open file
Ctrl+ Shift + Tab
View
Function
Shortcut Key
Show / hide Messagespane
F2
Show / hide Managementpane
Shift + F2
Move project up (in Projecttree)
Ctrl + Shift + Up
Move project down (in Projecttree)
Ctrl + Shift + Down
Activate prior (in Projecttree)
Alt + F5
Activate next (in Projecttree)
Alt + F6
Zoom in / out
Ctrl + Roll MouseWheel
Focus editor
CTRL + Alt +E
Search
Function
Shortcut Key
Find
Ctrl + F
Find next
F3
Find previous
Shift + F3
Find in files
Crtl + Shift +F
Replace
Ctrl + R
Replace in files
Ctrl + Shift +R
Goto line
Ctrl + G
Goto next changed line
Ctrl +F3
Goto previous changed line
Ctrl+ Shift + F3
Goto file
Alt + G
Goto function
Ctrl + Alt +G
Goto previous function
Ctrl +PgUp
Goto next function
Ctrl +PgDn
Goto declaration
Ctrl + Shift +.
Goto implementation
Ctrl +.
Open include file
Ctrl + Alt +.
Build
Function
Shortcut Key
Build
Ctrl + F9
Compile current file
Ctrl +Shift + F9
Run
Ctrl + F10
Build and Run
F9
Rebuild
Ctrl + F11
Debug
Function
Shortcut Key
Debug
F8
Continue debugging
Ctrl +F7
Step over a code block
F7
Step into a code block
Shift +F7
Step out of a code block
Ctrl +Shift + F7
Toggle breakpoint
F5
Run to cursor
F4
Previous error
Alt + F1
Next error
Alt + F2
Function
Undo last action
Redo last action
Cut selected text
Copy selected text
Paste text from clipboard
Select all text
Swap header / source
Comment highlighted code
Uncomment highlighted code
Duplicate line caret is on
Auto-complete /Abbreviations
Show call tip
Swap line caret is on with line aboveit
Toggle bookmark
Goto previous bookmark
Goto next bookmark
Toggle current blockfolding
Toggle all folds
CodeBlocks 代码 编辑器组件提供的快捷键,这些快捷键不能重新绑定(rebound)。
Function
Magnify text size.
Reduce text size.
Restore text size tonormal.
Cycle through recent files.
Indent block.
Dedent block.
Delete to start of word.
Delete to end of word.
Delete to start of line.
Delete to end of line.
Go to start of document.
Extend selection to start ofdocument.
Go to start of display line.
Extend selection to start of displayline.
Go to end of document.
Extend selection to end ofdocument.
Go to end of display line.
Extend selection to end of displayline.
Expand or contract a foldpoint.
Create or delete abookmark.
Go to next bookmark.
Select to next bookmark.
Find selection.
Find selection backwards.
Scroll up.
Scroll down.
Line cut.
Line copy.
Line delete.
Line transpose withprevious.
Line duplicate.
Find matching preprocessor conditional, skipping nestedones.
Select to matching preprocessorconditional.
Find matching preprocessor conditional backwards, skipping nestedones.
Select to matching preprocessor conditionalbackwards.
Previous paragraph. Shift extendsselection.
Next paragraph. Shift extendsselection.
Previous word. Shift extendsselection.
Next word. Shift extendsselection.
Previous word part. Shift extendsselection.
Next word part. Shift extendsselection.
Files
Function
New file or project
Open existing file orproject
Save current file
Save all files
Close current file
Close all files
CodeBlocks的Tab组件所提供的快捷键,这些快捷键不能重新绑定(rebound)。
Function
Activate next open file
Activate previous open file
View
Function
Show / hide Messagespane
Show / hide Managementpane
Move project up (in Projecttree)
Move project down (in Projecttree)
Activate prior (in Projecttree)
Activate next (in Projecttree)
Zoom in / out
Focus editor
Search
Function
Find
Find next
Find previous
Find in files
Replace
Replace in files
Goto line
Goto next changed line
Goto previous changed line
Goto file
Goto function
Goto previous function
Goto next function
Goto declaration
Goto implementation
Open include file
Build
Function
Build
Compile current file
Run
Build and Run
Rebuild
Debug
Function
Debug
Continue debugging
Step over a code block
Step into a code block
Step out of a code block
Toggle breakpoint
Run to cursor
Previous error
Next error