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

Add alignment options for CSV rows #18

SidOfc opened this issue Apr 22, 2018 · 0 comments


None yet
1 participant
Copy link

commented Apr 22, 2018

This is a proposal to add extra alignment options to CSV -> Markdown table conversion.
At the moment, everything is centered. This might not be how you want your table to look and on github, tables have alignment options by placing : on either or both sides of a column like so:

| Name         | Age | Gender |
| Eric Cartman | 10  |   Male |
| Stan Marsh   | 10  |   Male |

The first column is left aligned, the second is centered and the last is right aligned.
It would be nice to have a way to set the default alignment instead of assuming centered.
Aside from this, it would also be nice to have a customizable dictionary of header names so that we can always specify alignment for a certain column, e.g:

" default alignment, set to centered for backwards compatibility
:let g:mkdx#settings.table.default_alignment = 'centered'

" additional setting to control headers with specific alignment
:let g:mkdx#settings.table.column_alignment = {
    \ 'name': 'left',
    \ 'gender': 'right'
\ }

@SidOfc SidOfc self-assigned this Apr 22, 2018

SidOfc added a commit that referenced this issue Apr 22, 2018

Merge pull request #20 from SidOfc/feature/table-alignment
Merge #18 - Feature/table-alignment

@SidOfc SidOfc closed this Apr 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.