SublimeTableEditor icon indicating copy to clipboard operation
SublimeTableEditor copied to clipboard

Grid Tables

Open markcubberley opened this issue 11 years ago • 2 comments

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.

markcubberley avatar Jan 16 '15 15:01 markcubberley

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.

vkocubinsky avatar Jan 19 '15 09:01 vkocubinsky

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 +------+-------+!

robinrosenstock avatar Oct 31 '17 13:10 robinrosenstock