vkocubinsky / SublimeTableEditor

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

Split cell syntax contents generating table cells #42

Closed lmartins closed 10 years ago

lmartins commented 10 years ago

When I compile my markdown following your instruction to split a cell:

| sadasd |       das       |
| ------ | --------------- |
| sdad   | Senior Software |
|        | Engineer        |
| ------ | --------------- |
| sdasd  | sfafsf          |
| asdasd | dsdfsdf         |

I get this result: screenshot 2013-12-26 19 59 59

Any idea of what might be causing it?

Im compiling the markdown using Assemble

jonschlinkert commented 10 years ago

This convention won't convert properly to HTML. The output you're seeing is the correct, expected result.

lmartins commented 10 years ago

Is there any way this plugin can deal will long lines that must span across multiple lines? As it is now, as soon as a cell contents goes over a single line the table is completely broken in the editor (still outputs the correct code).

jonschlinkert commented 10 years ago

the table is completely broken in the editor

I haven't had this issue. Do you add line breaks or something similar?

lmartins commented 10 years ago

@jonschlinkert Im using Sublime's MarkdownEditing plugin combined with this one. Im not adding line-breaks in the table contents, but I do have line-wrap active in the editor, otherwise every row or paragraph wouldn't wrap.

SublimeTableEditor add space characters keep the table visual structure. This works really well as long as your cell contents don't need wrapping: screenshot 2013-12-27 09 40 12

Once they get a bit longer it just breaks: screenshot 2013-12-27 09 40 17

Do you have a different way to approach this?

Thanks.

vkocubinsky commented 10 years ago

For mutlimarkdown table syntax do not have. But let me show how to do this with for example EmacsOrgMode syntax and then you probably can inject result as not formatted text into your multi markdown document.

You can try split a long cell to 2 row. Let's we have a table

|    a    |             b             |
|---------+---------------------------|
| value a | _very very long value of b |
| value b | vary vary long value of b |
|         |                           |

Click "ctrl+k -"

|    a    |             b             |
|---------+---------------------------|
| value a | very very long value of b |
|---------+---------------------------|
| value b | very very long value of b |
|         |                           |

Move cursor to the position where you like split row

|    a    |             b             |
|---------+---------------------------|
| value a | very very long_ value of b |
|---------+---------------------------|
| value b | very very long value of b |
|         |                           |

Click alt+enter

|    a    |             b             |
|---------+---------------------------|
| value a | very very long            |
|         | value of b                |
|---------+---------------------------|
| value b | very very long value of b |
|         |                           |

Use Ctrl + j key if you like join cell back.

This is not multi markdown syntax but you can inject not formatted text into multi markdown with character "```"

lmartins commented 10 years ago

Sadly still doesn't compile right, as I need to work with long content i'll have to resort to regular tables, which is a shame as I really like the way your plugin works.

Thanks anyway for your help @vkocubinsky