What are the best code blocks short cuts ? Also is there some way we can directly indent all our code ? In addition how can we move through the active tabs in codeblocks ?
Highlight the lines of text. Then hit tab to indent them a level to the right, and shift-tab to outdent them a level to the left.
Tips about tab identation are helpful when you write your code from begining. But if you paste code in CodeBlocks from some external source, like PDF document, that code often will not have good identation.
In this case, you need to select code, right click on it, and choose Format use AStyle option. This is a plugin for CodeBlocks for right text formatting.
I hope this will help someone!
You (these are the default settings I believe) can select a block of code and press the Tab key. This will indent the entire block.
So for indenting a whole file: Ctrl + A, then Tab.
In addition, you can use Shift + Tab on a selected block to "unindent"
You can move through the open tabs with Ctrl + Shift + Tab.
As for the best shortcuts:
I like Ctrl + D to duplicate a line and
Ctrl + L to copy it.
Anyway, you can set whatever shortkeys you like in the Editor menu (there you will also be able to find all shortkey currently set).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With