dhruvasagar / vim-table-mode

VIM Table Mode for instant table creation.
2.11k stars 96 forks source link

Support Github flavoured markdown table #70

Open kminh opened 9 years ago

kminh commented 9 years ago

Is it possible to support the table format as shown here: https://help.github.com/articles/github-flavored-markdown/ ?

The main difference is the spaces in the header separator, for e.g. :

| ------------- | ------------- |
instead of
|---------------|---------------|

I find it much clearer to look at, suitable for minimalists.

arecarn commented 9 years ago

I've noticed if you add a single space between a | and - and reformat the table, your desired format is achieved, but then adding a : no longer aligns elements in columns.

dhruvasagar commented 9 years ago

I understand that however, the spaces are actually not required for building github flavored tables, so the support is there if you omit spaces.

|-----|:-----|
|    a|    b |
|-----|------|
dhruvasagar commented 9 years ago

But yes, having spaces isn't supported very well, I'll have to take a look into that.

kikyous commented 8 years ago

GitHub Flavored Markdown :+1:

adriaanzon commented 7 years ago

The examples in the new Github Flavored Markdown Spec also suggest using spaces around the hyphens: https://github.github.com/gfm/#tables-extension-

dhruvasagar commented 7 years ago

From what I checked last, this is not a requirement though.

jfelchner commented 7 years ago

I'd love to see this.

fancsali commented 11 months ago

I think, other MarkDown flavours usually prefer no spaces - as do my eyes. Can we perhaps add this?