Sublime Text 3 markdown plugin that offers table formatting.
Inspired by the Atom's version from fcrespo82 (Fernando).
markdowntableformatter[at]gmail[.]com
There are two basic ways of using this plugin. Select what you want to format and hit Ctrl+Alt+Shift+T or use the same shortcut without selection to format the entire document.
{
// make plugin verbose in debug console
"verbose": false,
// scan document to format tables when saving
"autoformat_on_save": false,
// spaces between "|" and cell's text
"margin": 1,
// additional spaces before/after cell's text (depending on justification)
"padding": 0,
// how text should be justified when not specified [LEFT, RIGHT, CENTER]
"default_justification": "LEFT"
}
To be recognised properly by the plugin, Markdown tables must not contain white space in the line that separate the table heading from the other table rows.
For example, the following works:
|:------------------|:---------------------|:-----------------|
This example will not work:
|:------------------| ---------------------|:-----------------|