mechatroner / vscode_rainbow_csv

🌈Rainbow CSV - VS Code extension: Highlight CSV and TSV files in different rainbow colors to make them more readable
MIT License
426 stars 51 forks source link

comment_prefix should comment to end of line always #138

Open dwr-psandhu opened 1 year ago

dwr-psandhu commented 1 year ago

Currently it only works at the beginning of the line. Allow the comment_prefix to mark it as inline (i.e. to the end of the line)

For the issue of character clash with the comment_prefix; Use double quotes to protect that use case.

mechatroner commented 1 year ago

Sorry for the late reply (I didn't have much time recently to work on the extension anyway). Do you mean something like this?

car,200
plane,1000
bike,50 # Is this an inline comment?
boat,20

BTW, one possible workaround for trailing CSV comments is to put them into the last "comment" column, see https://stackoverflow.com/a/68865143/2898283 I guess this would be in the spirit of the "comment" field in JSON.