vscode-table-formatter
vscode-table-formatter copied to clipboard
[proposal] Right align of numeric columns
For normal tables, columns with all numeric cells would be formatted with right align. EXAMPLE: before formatting:
| column1 | column2 |
|---------|---------|
| text1 | 12.00 |
| text2 | |
| text3 | 9 |
after formatting:
| column1 | column2 |
|---------|---------|
| text1 | 12.00 |
| text2 | |
| text3 | 9 |
I think this change refers to method getCellInfoList in helper.ts
OK. It looks nice. I will think about it.
It would be nice to right align by numbers by .:
| column1 | column2 |
|---------|---------|
| text1 | 12.02 |
| text2 | 1.1 |
| text3 | .01 |
| text4 | |
| text5 | 9 |
This would make comparing floats with different precision easier. I think intgers should only be right aligned, but aligning by . would be possible too:
| column1 | column2 |
|---------|---------|
| text1 | 12.02 |
| text2 | 1.1 |
| text3 | .01 |
| text4 | |
| text5 | 9 |