Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning on comment lines are not ignored #28

Open
cliuser opened this issue Jun 4, 2021 · 1 comment
Open

warning on comment lines are not ignored #28

cliuser opened this issue Jun 4, 2021 · 1 comment

Comments

@cliuser
Copy link

cliuser commented Jun 4, 2021

After setting g:rainbow_comment_prefix to #. when I put the cursor on a comment line, rainbow_csv reports "The number of fields in header and this (comment) line are different."
I'd expect it to ignore the comment lines.

rainbow_comment_warning

@mechatroner
Copy link
Owner

Thanks! They are actually ignored but only under some specific conditions, to work as expected you need to enable highlighting not by setting set ft=csv but by using :RainbowDelim command. This is because the current implementation has comment prefix encoded into ft value and csv with # comment will have filetype rcsv_2c_quoted_23. I don't remember why I decided to implement it this way, but there was some reasoning behind it. Maybe I will rewrite this logic later to store comment prefix separately from the filetype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants