2024年6月14日发(作者:)
1.12 通过命令行操作CodeBlocks
CodeBlocks能够通过命令行来运行。在这种情况下,需要通过一些选项来控制项目的构建过程。因为CodeBlocks是
scriptable的,所以CodeBlocks项目的构建可以集成到你自己的工作过程中。
codeblocks.exe /na /nd --no-splash-screen --built
--file=
/h, --help:显示帮助信息。
/na, --no-check-associations:不执行文件关联检查。(windows only)
/nd, --no-dde:不启动DDE服务。(windows only)
/ni, --no-ipc:不启动IPC服务。(Linux and Mac only)
/ns, --no-splash-screen:应用程序启动的时候,不显示启动画面。
/d, --debug-log:显示应用程序的调试日志
--prefix=
/p, --personality=
--rebuild:清理并重新编译工程或解决方案。
--build:编译工程或解决方案。
--target=
--no-batch-window-close:编译完成的时候,不关闭日志窗口。
--batch-build-notify:编译完成的时候显示提示信息
--safe-mode:启动的时候,所有插件都不可用。
>
1.13 快捷键
在IDE中使用快捷键比使用鼠标更为高效。下表给出CodeBolcks默认的快捷键。(译者注:笔者将CodeBlocks中
的快捷键设置为与VS大体一致,使用CodeBlocks时非常顺手。)
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
Shortcut Key
Ctrl + Z
Ctrl + Shift + Z
Ctrl + X
Ctrl + C
Ctrl + V
Ctrl + A
F11
Ctrl + Shift + C
Ctrl + Shift + X
Ctrl + D
Auto-complete / Abbreviations
Show call tip
Ctrl + Space / Ctrl + J
Ctrl + Shift + Space
Swap line caret is on with line above it C trl + T
Toggle bookmark
Goto previous bookmark
Goto next bookmark
Toggle current block folding
Toggle all folds
Ctrl + B
Alt + PgUp
Alt + PgDown
F12
Shift + F12
CodeBlocks代码编辑器组件提供的快捷键,这些快捷键不能重新绑定(rebound)。
Function
Magnify text size.
Reduce text size.
Restore text size to normal.
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 of document.
Go to start of display line.
Extend selection to start of display line.
Go to end of document.
Extend selection to end of document.
Go to end of display line.
Extend selection to end of display line.
Expand or contract a fold point.
Create or delete a bookmark.
Go to next bookmark.
Select to next bookmark.
Find selection.
Find selection backwards.
Shortcut Key
Ctrl + Keypad "+"
Ctrl + Keypad "-"
Ctrl + Keypad "/"
Ctrl + Tab
Tab
Shift + Tab
Ctrl + BackSpace
Ctrl + Delete
Ctrl + Shift + BackSpace
Ctrl + Shift + Delete
Ctrl + Home
Ctrl + Shift + Home
Alt + Home
Alt + Shift + Home
Ctrl + End
Ctrl + Shift + End
Alt + End
Alt + Shift + End
Ctrl + Keypad "*"
Ctrl + F2
F2
Alt + F2
Ctrl + F3
Ctrl + Shift + F3
Scroll up.
Scroll down.
Line cut.
Line copy.
Line delete.
Line transpose with previous.
Line duplicate.
Find matching preprocessor conditional, skipping nested ones.
Select to matching preprocessor conditional.
Ctrl + Up
Ctrl + Down
Ctrl + L
Ctrl + Shift + T
Ctrl + Shift + L
Ctrl + T
Ctrl + D
Ctrl + K
Ctrl + Shift + K
Find matching preprocessor conditional backwards, skipping nested ones. Ctrl + J
Select to matching preprocessor conditional backwards.
Previous paragraph. Shift extends selection.
Next paragraph. Shift extends selection.
Previous word. Shift extends selection.
Next word. Shift extends selection.
Previous word part. Shift extends selection.
Next word part. Shift extends selection.
Ctrl + Shift + J
Ctrl + [
Ctrl + ]
Ctrl + Left
Ctrl + Right
Ctrl + /
Ctrl +
Files
Function
New file or project
Shortcut Key
Ctrl + N
Open existing file or project Ctrl + O
Save current file
Save all files
Close current file
Close all files
Ctrl + S
Ctrl + Shift + S
Ctrl + F4 / Ctrl + W
Ctrl + Shift + F4 / Ctrl + Shift + W
CodeBlocks的Tab组件所提供的快捷键,这些快捷键不能重新绑定(rebound)。
Function
Activate next open file
Shortcut Key
Ctrl + Tab
Activate previous open file Ctrl + Shift + Tab
View
Function
Show / hide Messages pane
Show / hide Management pane
F2
Shift + F2
Shortcut Key
Move project up (in Project tree) Ctrl + Shift + Up
Move project down (in Project tree) Ctrl + Shift + Down
Activate prior (in Project tree)
Activate next (in Project tree)
Zoom in / out
Focus editor
Alt + F5
Alt + F6
Ctrl + Roll Mouse Wheel
CTRL + Alt + E
Search
Function
Find
Find next
Find previous
Find in files
Replace
Replace in files
Goto line
Goto next changed line
Shortcut Key
Ctrl + F
F3
Shift + F3
Crtl + Shift + F
Ctrl + R
Ctrl + Shift + R
Ctrl + G
Ctrl + F3
Goto previous changed line Ctrl + Shift + F3
Goto file
Goto function
Goto previous function
Goto next function
Goto declaration
Goto implementation
Open include file
Alt + G
Ctrl + Alt + G
Ctrl + PgUp
Ctrl + PgDn
Ctrl + Shift + .
Ctrl + .
Ctrl + Alt + .
Build
Function
Build
Shortcut Key
Ctrl + F9
Compile current file Ctrl + Shift + F9
Run
Build and Run
Rebuild
Ctrl + F10
F9
Ctrl + F11
Debug
Function
Debug
Continue debugging
Shortcut Key
F8
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
Run to cursor
Previous error
Next error
F5
F4
Alt + F1
Alt + F2


发布评论