Reputation: 135
I'm using IDEA 2019.3 Ultimate edition which ships with markdown support. I'm trying to insert a table like this:
| Key | Func |
|-------|--------|
| cmd+n | search |
but I found tab
not working and IDEA doesn't help to indent the table so I have to manually add lots of -
. Is there an efficient way to insert a table in IDEA?
Upvotes: 12
Views: 8679
Reputation: 86
Since 2022.1
you can use Code > Generate... > Table
or Insert... > Table
(cmd-N
) to insert tables.
You can checkout official IDEA documentation for table support in Markdown plugin.
Upvotes: 7
Reputation: 505
This does not address the OP's original problem, but hopefully it can help others that arrive here as a result of IDEA not rendering their markdown tables.
In my case I needed to add more -
characters on the second line. IDEA seems to require a minimum of 3 dashes in order to display the markdown table.
| Some | Table | Header | Values |
| :-: | :-: | :-- | --: |
| Centre | Centre | Left | Right |
| Some | Table | Header | Values |
| :-: | :-: | :-- | --: |
| Centre | Centre | Left | Right |
| Some | Table | Header | Values |
| :---: | :---: | :--- | ---: |
| Centre | Centre | Left | Right |
-----------------------------------
| Some | Table | Header | Values |
| Centre | Centre | Left | Right |
-----------------------------------
Upvotes: 2
Reputation: 195
Make sure there is an empty line above the table for it to be rendered:
Some texts:
| Tables | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |
(using activedecay's text example)
Upvotes: 7
Reputation: 81
Intellij community edition 2020.3.3
|header 1|header 2|
---|---
|xyz|x|
|xyz|y|
Upvotes: 8
Reputation: 10867
Works for me in IntelliJ IDEA version 2020.2.3
| Tables | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |
Upvotes: 2
Reputation: 814
I don't think this is possible at the moment.
As a workaround you can use the Markdown Table Generator which lets you generate the markdown code while being able to input data in a normal table.
Upvotes: 1