Codeblocks shortcut key (reprint)

Source: Internet
Author: User


• Press and hold the CTRL roll, and the font of the code will grow smaller with your heart.
• Press and hold the right mouse button in the edit area to drag the code, eliminating the hassle of pulling (especially the horizontal) scroll bar; Related settings: Mouse Drag scrolling.
ctrl+d can copy the current row or the selected block.
Ctrl+shift+c comment out the current line or the selected block, Ctrl+shift+x uncomment it.
tab indents the current line or the selected block, Shift+tab reduces indentation.
• Drag the selected block to move it to a new location, hold down CTRL and copy to the new location.
• Press ATL, and then drag the mouse to implement a partial selection (that is, only the characters in one area are selected, not the other characters in the row they are in).
• When larger editing space is required, the F2 and shift+f2 can be explicitly hidden below logs & others bar and management bar on the left.

= = Auto complete and abbreviation = =

1) Optimize the Code autocomplete function: in code-completion and Symbol browser,
• Change the Automatically launch when typed # 4 to 2 so that two letters will be prompted.
• Hook the keyword sets to additionally include from 1 to 9 (can be highlighting in syntax keywords ... , where 1 is the C + + keyword, and 3 is the Doxygen keyword; I have added the Wxwidgets class name to 7 and set the appropriate font (in bold), which is especially cool when looking at the code.
• Put the delay for auto-kick-in when typing [.::->] pull to 200ms, so hurry up and prompt.
• Check case-sensitive match to prevent extraneous distractions if you want it to help you correct the case, then remove the tick.
• In Keyboard short-cuts, the shortcut key for Edit->code complete is changed from Ctrl+space to alt+/because the former conflicts with the Chinese input method, which provides automatic completion for the word that has already been entered (not being entered).

2) Look at the abbreviation column, which defines a number of abbreviations (also can be customized), as long as you enter these abbreviations, and press CTRL+J, you can automatically complete the common code framework, and put the cursor in the appropriate place (custom-made with | expression). Commonly used are: Guard, class, switch and so on.

3) If you declare a class, you can right-click in the CPP file, Insert->all class methods without implementation ... To insert the definition of a method you haven't defined (save a lot of typing), or use Insert->class method declaration/implementation ... To insert the declaration or definition of a method.

= = Navigation related = =

Ctrl+g arrives at the specified line, Alt+g arrives at the specified file, Ctrl+alt+g arrives at the specified function (supports the function definition in the header file), F11 switches the source file to the header file.
Ctrl+pageup arrives at the previous function, Ctrl+pagedown arrives at the next function.
ctrl+b add bookmarks, alt+pageup and alt+pagedown can toggle bookmarks.
ctrl+shift+b can find matching parentheses.
• When looking at long code, you can right-click, Folding->fold all, and then slowly expand to see, you can also make full use of the left management bar symbol browser.
• Right-click on a variable, function, or macro, three menu items starting with Find, respectively, you can go to its declaration, definition, and find all occurrences (press F2 to view below thread search).
Other:
In general settings, you can set indentation, wrap, and other details.
• Let code::blocks always remember your layout, especially the debug layout, and use the Debug toolbar.
• Backup C:/Documents and settings/[your user name]/application data/codeblocks/ Default.conf, in case of reloading, put it in the Codeblocks.exe directory, will not lose your configuration, it can also create a green version of Code::Blocks.


Ctrl+l Cut selected row

F11 switching between source files and header files

F10 fullscreen

Ctrl+shift+b Bracket Matching

Press ATL, and then drag the mouse to make a partial selection

Ctrl+b add bookmarks, alt+pageup and pagedown can toggle bookmarks.

Ctrl+g arrives at the specified line


Alt+g reaching the specified file

Ctrl+alt+g arrives at the specified function (supports function definitions in header file)

Ctrl+pageup arrives at the previous function

Ctrl+pagedown reach the next function

Codeblocks shortcut key (reprint)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.