Is it possible to create and preview a table using Visual Studio Code Markdown?

Viewed 8369

I am using Visual Studio Code to write some notes using its Markdown support. I would like to add some tables, but I can't find a way to do it. It seems that Visual Studio Code implements CommonMark which does not include tables in the specification.

I know that GitHub flavoured Markdown has a table extension which provides this feature and there are a couple of table formatter Visual Studio Code extensions (here and here), but they just layout the text nicely. I would like to a table to show up in the preview pane.

Any suggestions for how to achieve some tables in Visual Studio Code Markdown?

2 Answers

You can now do something like this:

| Letter | Digit | Character |
| :----: | :---: | :-------: |
| a      | 4     | $         |
|        | 365   | (         |
| b      |       | ^         |

"Empty" cells must have at least one space in them. This will display in vscode's markdown preview as:

markdown table demo in vscode preview

Related