Closed andreyorst closed 5 years ago
Indeed quite interesting that it happens in other editors/IDEs too.
what I've found: If you call a variable, for example main
, it will be colored as a function. So i think that the highlighting system knows all of the standard names, not only for types and constructions like template
, but a common functions too. But user-defined functions are colored only if they have a parentheses ()
after it. Screenshot to assume everything:
The code (to try in other editors, if wanted):
void fo() {
char maen;
maen = 'a';
}
void foo
() {
char main;
main = 'a';
int template;
template = 5;
bool vector;
vector = true;
}
int main
() {
fo
();
foo();
}
Don't think that I use such style in my daily programming
void foo
() {
// ...
}
It's just to show what I mean.
Hello. This is not critical issue, but sometimes variables are colored as functions. I don't see it often, but seems like it represents when variable name is same as some function,
beg
for example. It happens with other names too. For example:will be colored in vim like:
beg
is the same blue assort
, which is confusing when you do a quick lookup on the code. All other variables are always colored white.I've checked it in other programs and I found that it is a common problem.
Sublime Text: ...
KDevelop: interesting...
Visual Studio Code: well, it's just stupid
in Code::Blocks it works slightly different from vim: