Code::Blocks Forums

User forums => Help => Topic started by: Cutter on March 08, 2013, 12:44:39 pm

Title: Syntax Highlighting Problem for C++
Post by: Cutter on March 08, 2013, 12:44:39 pm
Hey, i have been a code::blocks user for a while now, but only with the newest version of code::blocks do i get a problem with the syntax highlighting for default c++. The highlighting completely messes up and does not match the example box for the syntax highlighting chooser options. The stranger thing is that i have never actually changed the options for syntax highlighting at all.

The best way to show this is with pictures, so here goes:

As you can see in this image, the using statement is being incorrectly highlighted, one of the methods is being highlighted, the name string is being highlighted and if you look at the very bottom, part of the comment is being shown as an error (better example on second image)
http://imgur.com/0sB4qHS

in this image, using statements are being obscure again, strings are being shown as errors as well as comments
http://imgur.com/q7Bkmb2

this image shows my current syntax selection and the preview of the code
http://imgur.com/MFr8G9Y

i have used the search function on both here and google, but could not find any references or fixes to this problem. I have tried uninstalling and then reinstalling codeblocks, i have tried deleting my projects and copying the text files into new ones.

Anyone have any potential ideas? the code works fine, its just outright annoying to see comments and strings being flagged as errors out of the corner of my eye.

Thanks
Title: Re: Syntax Highlighting Problem for C++
Post by: Jenna on March 08, 2013, 01:03:21 pm
The red lines have nothing to do with errors or not (C::B can not do syntax-checking on the source-code), they are drawn by the spellchecker-plugin.
Either enable it, or disable online spellchecking or use the correct dictionary for your preferred langauge. This is answered (and asked) many times in the forum, ut it is not easy to find the correct search-string to find it.

The other issues might be related to highlight stl-keywords.
I think there is an option to turn it off, but this might have come after the 12.11 release ( I can not check this at the moment, sorry).
Title: Re: Syntax Highlighting Problem for C++
Post by: Cutter on March 08, 2013, 02:16:11 pm
ok yeah, the red lines have been solved due to the fact that by default the spell checker is enabled, but no dictionary is set as default, which is kinda weird and illogical? because it tells you all words are incorrectly spellt due to no dictionary being set as default.

anyways, thanks for the quick help as this is now far less annoying to work with.