vkocubinsky / SublimeTableEditor

This package is no more supported. I moved to vim.
Other
494 stars 67 forks source link

Grid Tables #53

Open markcubberley opened 9 years ago

markcubberley commented 9 years ago

I'd like to create a Pandoc Grid Table with lists in cells. I have the following user settings:

"table_editor_syntax": "Pandoc",
"table_editor_border_style": "grid",
"table_editor_keep_space_left": true,

Can you give me a sense of how Table Editor should behave differently with these user settings versus the default settings? An example would be awesome. Thanks.

vkocubinsky commented 9 years ago

Pandoc alredy have border style "grid". Property "table_editor_keep_space_left" must control leading space from a data in a column. Properties "table_editor_border_style", "table_editor_keep_space_left" must override "Pandoc" setting "table_editor_keep_space_left": false. But I observed this doesn't work. Also it looks "table_editor_keep_space_left" was broken.

robinrosenstock commented 7 years ago

Pandoc grid tables should always start with +------+-------+!

When specifying "table_editor_syntax": "Pandoc", (see Pandoc grid tables) and following the Usage in the Readme but with |= double hline:

| Name | Phone |
|=

it will expand to:

| Name | Phone |
+======+=======+
|      |       |

But it should expand to:

+------+-------+
| Name | Phone |
+======+=======+
|      |       |

To get the first line: +------+-------+, you go above the line: | Name | Phone | and type: |- then hitting enter like this:

|-
| Name | Phone |
+======+=======+
|      |       |

Then it will autocomplete to +------+-------+ You have to do the |- for every new row (because the normal way of creating new rows are for multiline) . Maybe there should be another keyboard shortcut or something. But this belongs to another issue...

This also should answer @MarkCubb question, because When specifying "table_editor_syntax": "Simple", (which is the default) it will expand to

| Name | Phone |
|------|-------|
|      |       |

Now the option "table_editor_border_style": "grid", belongs only to Simple syntax which will exchange the header form to:

| Name | Phone |
+------+-------+
|      |       |

which is correct for Simple syntax but not for Pandoc syntax (see above). So Pandoc grid tables should always start with +------+-------+!