【正文】
hen finished’。 編輯器縮放 CodeBlocks提供了一個(gè)非常高效的編輯器。如果你的鼠標(biāo)有滾輪,你只要按住Ctrl鍵,同時(shí)滾支鼠標(biāo)滾輪,就可以實(shí)現(xiàn)文本的縮放。 自動(dòng)換行模式 在CodeBlcoks中打開一個(gè)文本文件,使用自動(dòng)換行模式可以將很長(zhǎng)的行以多行的形式顯示在一個(gè)屏幕內(nèi),有利于編輯?!?塊選文本 CodeBlocks支持在代碼編輯器中塊選文本。如果你想選擇數(shù)組的幾列進(jìn)行復(fù)制和粘貼,這個(gè)功能是非常有用的(譯者注:VS也提示類似的功能,快捷鍵也一樣。如圖: 代碼折疊 CodeBlocks支持代碼折疊,允許將函數(shù)、類的實(shí)現(xiàn)折疊起來。 自動(dòng)完成 在CodeBlocks中打開一個(gè)項(xiàng)目時(shí),編譯器的相關(guān)目錄(include目錄)與項(xiàng)目的源文件/頭文件將被解析,提取有關(guān)類型定義、函數(shù)、宏等的信息,CodeBlocks使用這些信息來實(shí)現(xiàn)自動(dòng)完成功能。)。 查找破損文件(Find broken files) 如果一個(gè)文件已經(jīng)從磁盤中刪除,但它仍然被包含在項(xiàng)目文件()中(譯者注:項(xiàng)目的文件信息保存在*.cbp文件里。應(yīng)該通過上下文菜單[Remove file from project]將它從項(xiàng)目中移除。CodeBlocks提供ThreadSearch插件來解決這個(gè)問題。當(dāng)ThreadSearch找到一個(gè)跋損文件的時(shí)候,會(huì)發(fā)出一個(gè)文件丟失的錯(cuò)誤。庫可以以絕對(duì)路徑的形式給出,也可以只給出名稱而無需提供lib前綴和文件擴(kuò)展名。 對(duì)象鏈接順序 在編譯過程中,(對(duì)于嵌入式系統(tǒng),)。在CodeBlocks中,可以設(shè)置相關(guān)源文件的優(yōu)先級(jí)來實(shí)現(xiàn)。較低優(yōu)先級(jí)使文件較先鏈接。可以通過菜單[SettingsEnvironmentAutosave]來激活該功能。如下圖: 通過命令行操作CodeBlocks CodeBlocks能夠通過命令行來運(yùn)行。因?yàn)镃odeBlocks是scriptable的,所以CodeBlocks項(xiàng)目的構(gòu)建可以集成到你自己的工作過程中。file=filename[:line]:使用CodeBlocks打開指定文件。/h, help:顯示幫助信息。(windows only)/nd, nodde:不啟動(dòng)DDE服務(wù)。(Linux and Mac only)/ns, nosplashscreen:應(yīng)用程序啟動(dòng)的時(shí)候,不顯示啟動(dòng)畫面。你可以使用“ask”參數(shù)來列出可選擇的個(gè)性化配置。build:編譯工程或解決方案。batchbuildnotify:編譯完成的時(shí)候顯示提示信息safemode:?jiǎn)?dòng)的時(shí)候,所有插件都不可用。這是標(biāo)準(zhǔn)DOS/*nix shell的輸出重定向,并非CodeBlocks內(nèi)置選項(xiàng)。下表給出CodeBolcks默認(rèn)的快捷鍵。)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 Unment highlighted code Ctrl + Shift + X Duplicate line caret is on Ctrl + D Autoplete / 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 CodeBlocks代碼編輯器組件提供的快捷鍵,這些快捷鍵不能重新綁定(rebound)。Function Shortcut Key Activate next open file Ctrl + Tab Activate previous open file Ctrl + Shift + Tab View Function Shortcut 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 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 本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:26