+12

Incomplete C++ syntax highlighting

John Moutrihas 7 years ago • updated by Nicholas Braden 7 years ago 2
The syntax highlighting for C++ look incomplete. For instance very common keywords are not highlighted at all and are treated as common identifiers. More specifically keywords like while, for, if, return, namespace, switch, case look the same as identifiers while other keywords such as using, type modifiers (cost, static) and data types (float, int) and literals (true, false, NULL) are properly highlighted.

This makes code structure hard to read and easy to miss :) Is this a conscious choice, an omission or a bug?

I'm running on ubuntu 64bit on version 2.0, build 2210, but also in previous builds.
+3

I don't see an issue with return, while, switch, for or if but I do see missing highlighting on these C++ keywords:


using namespace foo; // namespace is not highlighted

namespace foo { // namespace is not highlighted

class foo : public bar {}; // public is not highlighted


C++11:

The new keywords are not highlighted (decltype, nullptr, alignas, alignof, constexpr, noexcept, thread_local).


It would also be nice if the double underscore identifiers (__FILE__, __attribute__ etc.) were to be highlighted.

I am also noticing that the new C++11 keywords are not highlighted. Is there some file I can edit to change this myself?