xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Invalid highlight of preprocessor block comments (C language) #57

Closed fcelda closed 11 years ago

fcelda commented 11 years ago

Types and function names in blocks of C code commented out using preprocessor macros (#if 0+#endif) are incorrectly highlighted. They should be highlighted as a comment.

See the screenshot:

wrong-highlight

xolox commented 11 years ago

Thanks for the bug report. I believe I just fixed this in the latest release. Can you confirm? If it now works for you, please close the issue on GitHub. Happy Vimming!

fcelda commented 11 years ago

Thank you for quick response. Unfortunately it is not fixed.

I have verified that g:easytags_ignored_syntax_groups is really set to '.*String.*,.*Comment.*,cIncluded,cCppInElse2,cCppOutIf2', but I'm still seeing the function names and structures highlighted. Do you need some additional information?

fcelda commented 11 years ago

Adding cCppOut2 seems to fix it for me... but I'm not sure if it is a correct fix.

fcelda commented 11 years ago

It seems that the invalid highlight happens even in Doxygen comments.

xolox commented 11 years ago

Thanks for the feedback! I just released version 3.3.8 to GitHub and Vim.org. It should fix both of the issues you reported (cCppOut2 and Doxygen comments) since my last release. If I still missed some highlighting groups, feel free to get back to me again. It's little trouble to add this and of course the better the experience for new users of vim-easytags is, the happier I am as well :-)

xolox commented 11 years ago

Small heads up: I just noticed a very unpleasant behavior in Vim's :syntax command:

easytags.vim 3.3.8: Vim(syntax):E409: Unknown group name: doxygen.* (at function xolox#easytags#autoload..xolox#easytags#highlight, line 49)

I have some ideas about how to work around this, will fix it this evening.

ixti commented 11 years ago

@xolox I have same E409 when I try to update tags

xolox commented 11 years ago

@ixti Sorry about that, it was an unintended consequence of the changes made in response to this issue. I just now released a new version of vim-easytags that should resolve both issues (the original one and the one I introduced earlier tonight).

ixti commented 11 years ago

@xolox You're the man! Works like a charm! Thanks!

ixti commented 11 years ago

Hmm... some other problems came out, not sure if i need to report a new issue.

Yhis one happened after i tried :UpdateTags -R . in my rails app directory

easytags.vim 3.3.9: Vim(let):E684: list index out of range: 0 (at function xolox#easytags#update..<SNR>66_prep_cmdline, line 3)

This one came out when I tried :UpdateTags -R app/

easytags.vim 3.3.9: Failed to highlight 4952 rubyMethodName tags because pattern is too big! (86 KB)
xolox commented 11 years ago

@ixti:

Yhis one happened after i tried :UpdateTags -R . in my rails app directory

easytags.vim 3.3.9: Vim(let):E684: list index out of range: 0 (at function xolox#easytags#update..<SNR>66_prep_cmdline, line 3)

This might be a bug, I'll look into it tomorrow.

This one came out when I tried :UpdateTags -R app/

easytags.vim 3.3.9: Failed to highlight 4952 rubyMethodName tags because pattern is too big! (86 KB)

This is certainly nothing new, you just hit the limit of what Vim can highlight. I have some plans about how to improve this; it's on my to-do list. Two tips for the current situation:

ixti commented 11 years ago

Thanks, man!

xolox commented 11 years ago

I'm closing this issue now because I believe the original problem reported by @fcelda is resolved. If it's not, feel free to reopen this issue. Thanks for the feedback and happy Vimming!


@ixti:

Yhis one happened after i tried :UpdateTags -R . in my rails app directory

easytags.vim 3.3.9: Vim(let):E684: list index out of range: 0 (at function xolox#easytags#update..<SNR>66_prep_cmdline, line 3)

This was indeed a bug. It should be fixed in version 3.3.11. Thanks for the report!

ixti commented 11 years ago

Thanks!

fcelda commented 11 years ago

Thank you, @xolox! The original report is fixed indeed. No wrong highlights inside preprocessor comments with 3.3.12.