Editors

The CodeBlocks editor supports all the major features you expected, including syntax highlighting, code folding, bookmarks etc. See the CodeBlocks document site http://codeblocks.org/docs/main_codeblocks_en.html for details. Some lesser-known but useful features:

 

     As CodeBlocks opens a project, it parses the content so that it can auto-complete functions and other names as you type. Just hit Enter to accept its suggestions.

     Code folding collapses a block of text for visual decluttering. Folding properties are controlled under Settings->Editor->Folding

     You can select a regular block of text narrower than the full width of the editor (e.g. a column of array elements) by holding down the ALT key before selecting the text (using the left mouse button).

     Autosave can be enabled under Settings->Environment.

Syntax Highlighting Pitfall

NOTE: since the editor does not fully parse all the header and source files in your project in the same manner that a compiler does, occasionally syntax highlighting may be incorrect regarding conditional code. For example, if you have a block of code as follows:

 

#ifdef foobar

void foo(void)

{

// some code here

}

#endif

 

It is possible that the editor may not display the conditional text correctly, depending on how you define or not define “foobar”. In particular, if you define the macro using the compiler option -Dfoobar in Project->Build Options->Compiler/Linker tab, the editor does not see that definition, and will show the conditional as being false instead of being true.

 

The CodeBlocks team is investigating various solutions to this known issue.