vim-table-mode icon indicating copy to clipboard operation
vim-table-mode copied to clipboard

Support Github flavoured markdown table

Open kminh opened this issue 10 years ago • 8 comments

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.

kminh avatar Nov 15 '15 14:11 kminh

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.

arecarn avatar Nov 15 '15 21:11 arecarn

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 avatar Nov 17 '15 05:11 dhruvasagar

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

dhruvasagar avatar Nov 17 '15 05:11 dhruvasagar

GitHub Flavored Markdown :+1:

kikyous avatar Dec 21 '15 01:12 kikyous

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

adriaanzon avatar Apr 04 '17 14:04 adriaanzon

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

dhruvasagar avatar Apr 05 '17 01:04 dhruvasagar

I'd love to see this.

jfelchner avatar May 12 '17 04:05 jfelchner

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

fancsali avatar Dec 04 '23 20:12 fancsali