3

Vim doesn't want to highlight my target named " * .o " and its dependencies because of the char ' * ' that I use to target all object files. When I replace the ' * ' by letters the highlighting works correctly.

Vim makefile bad syntax highlighting

Is this behavior normal or is it a vim bug ? Would be nice to know if there is a way to fix it.

1 Answer 1

1

That rule could be better written as

%.o: %.cpp
    clang++ -Wall (...) $<

This way, only the source files newer than their object files are compiled. And the highlighting will also work as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .