Closed justinjhendrick closed 8 years ago
Yes, I can see the problem here.. (and it applies only to a very specific set of comments :wink:):
Your sample comment starts with #include
which also happens to be a valid GCC preprocessor directive and thus is not highlighted as a comment (try adding any letter before the first 'i' and the highlight returns to comment-mode).
GAS supports preprocessing files by GCCs preprocessor and gas.vim knows about this and applies special highlighting to the directives #include
, #if
, #else
, #endif
and #define
.
I don't think removing line 2021 and thus the preprocessor highlighting is the right way to go.
However I could provide an option to explicitly disable preprocessor detection (something like let g:gasDisablePreproc=1
).
Ah, it's only starting with include, haha
I wasn't suggesting removing 2021, just letting you know where the clash was occurring. That setting sounds like a reasonable solution. Thanks!
When a comment does not have code preceding it, it is not highlighted.
The problem is fixed when I comment out this line: https://github.com/Shirk/vim-gas/blob/master/syntax/gas.vim#L2021
Below is an example program that gcc compiles just fine, but the comment beneath the "Hello, world!" string is not highlighted by gas.