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
436 stars 53 forks source link

"Align CSV Columns" shifts number with 4 spaces to the right #151

Open prechy123 opened 1 year ago

prechy123 commented 1 year ago

After using Align CSV Columns numbers are shifted to the right with 4 spaces, affecting when it is called in code.

mechatroner commented 1 year ago

Could you please clarify what do you mean by "affecting when it is called in code"? I also need an example of the current and expected behavior. There is a special rule for numbers alignment (see #106), unlike non-number fields they are aligned to the right so that it is easier to compare the values.

prechy123 commented 1 year ago

Without Align CSV Columns

image

With Align CSV columns

image

It can easily be fixed by using strip(), but i think the extension should be able to take care of it, it cost me several minutes of debugging

mechatroner commented 1 year ago

I guess I can add a config option that would tell if the numbers should be aligned to the right (default) or to the left like all other non-number fields.