CodeBlocks的常用快捷键

CodeBlocks常用操作快捷键
编辑部分:
Ctrl + A:全选
Ctrl + C:复制
Ctrl + X: 剪切
Ctrl + V:粘贴
Ctrl + Z:撤销
Ctrl + S:保存
Ctrl + Y / Ctrl + Shift + Z:重做
Ctrl+Shift+C:注释掉当前行或选中块
Ctrl+Shift+X:解除注释
Tab:缩进当前行或选中块
Shift+Tab:减少缩进
按住Ctrl,滚动鼠标滚轮,放大或缩小字体


编译与运行部分:
Ctrl + F9:编译
Ctrl + F10:运行上次成功编译后的程序
Ctrl + Shift + F9:编译当前文件(而不是当前打开的工程项目)
F9:编译并运行当前代码(如果编译错误会提示错误而不会运行)
F8:debug
F10:全屏
Ctrl + C:终止正在运行的程序
Ctrl + Z:终止输入


界面部分:
Shift + F2:左侧导航栏


熟练的掌握和使用这些快捷键可以有效的提高我们的工作效率,节约时间。


以下全部快捷键说明来自:http://wiki.codeblocks.org/index.php?title=Keyboard_Shortcuts

FunctionShortcut 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 above it Ctrl + T
Toggle bookmark Ctrl + B
Goto previous bookmark Alt + PgUp
Goto next bookmark Alt + PgDown
Toggle current block folding F12
Toggle all folds Shift + F12


This is a list of shortcuts provided by the Code::Blocks' editor component. These shortcuts cannot be rebound.

FunctionShortcut Key
Magnify text size. Ctrl + Keypad "+"
Reduce text size. Ctrl + Keypad "-"
Restore text size to normal. 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 of document. Ctrl + Shift + Home
Go to start of display line. Alt + Home
Extend selection to start of display line. Alt + Shift + Home
Go to end of document. Ctrl + End
Extend selection to end of document. Ctrl + Shift + End
Go to end of display line. Alt + End
Extend selection to end of display line. Alt + Shift + End
Expand or contract a fold point. Ctrl + Keypad "*"
Create or delete a bookmark. 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 with previous. Ctrl + T
Line duplicate. Ctrl + D
Find matching preprocessor conditional, skipping nested ones. Ctrl + K
Select to matching preprocessor conditional. Ctrl + Shift + K
Find matching preprocessor conditional backwards, skipping nested ones. Ctrl + J
Select to matching preprocessor conditional backwards. Ctrl + Shift + J
Previous paragraph. Shift extends selection. Ctrl + [
Next paragraph. Shift extends selection. Ctrl + ]
Previous word. Shift extends selection. Ctrl + Left
Next word. Shift extends selection. Ctrl + Right
Previous word part. Shift extends selection. Ctrl + /
Next word part. Shift extends selection. Ctrl + \

Files

FunctionShortcut Key
New file or project Ctrl + N
Open existing file or project 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


This is a list of shortcuts provided by the Code::Blocks' tab component. These shortcuts cannot be rebound.

FunctionShortcut Key
Activate next open file Ctrl + Tab
Activate previous open file Ctrl + Shift + Tab


View

FunctionShortcut Key
Show / hide Messages pane F2
Show / hide Management pane Shift + F2
Move project up (in Project tree) Ctrl + Shift + Up
Move project down (in Project tree) Ctrl + Shift + Down
Activate prior (in Project tree) Alt + F5
Activate next (in Project tree) Alt + F6
Zoom in / out Ctrl + Roll Mouse Wheel
Focus editor CTRL + Alt + E


Search

FunctionShortcut 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

FunctionShortcut Key
Build Ctrl + F9
Compile current file Ctrl + Shift + F9
Run Ctrl + F10
Build and Run F9
Rebuild Ctrl + F11


Debug

FunctionShortcut 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

  • 47
    点赞
  • 214
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
根据引用\[1\]和引用\[2\]的内容,要在Code::Blocks中替换快捷键,可以按照以下步骤进行操作: 1. 打开Code::Blocks,点击菜单栏的"Settings",然后选择"Editor..."。 2. 在弹出的对话框中,使用滚动条找到"Keyboard shortcuts"菜单,并点击展开。 3. 在"Commands:"一栏中,找到需要替换快捷键的命令。 4. 在"New shortcut:"下的文本框中,输入你想要设置的新快捷键,比如Ctrl+Shift+F。 5. 点击"Add"按钮,完成快捷键的替换。 另外,根据引用\[3\]的内容,Code::Blocks还提供了一些其他的快捷键,比如Ctrl+G到达指定行,ALT+G到达指定文件,Ctrl+Alt+G到达指定函数,F11切换源文件与头文件等。你可以根据自己的需求使用这些快捷键来提高编码效率。 #### 引用[.reference_title] - *1* [Codeblocks 常用快捷键整理](https://blog.csdn.net/Tuck_stonck/article/details/123394312)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [CodeBlocks 快捷键篇(自己整理)](https://blog.csdn.net/u013820168/article/details/107043720)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值