Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert a markdown table in IntelliJ IDEA?

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?

like image 839
ArchCST Avatar asked Dec 24 '19 15:12

ArchCST


People also ask

How do I create a Markdown in Intellij?

Create a new Markdown fileRight-click a directory in the Project tool window Alt+1 and select New | File. Alternatively, you can select the necessary directory, press Alt+Insert , and then select File. Enter a name for your file with a recognized extension, for example: readme.md.

Can you make a table in Markdown?

To add a table, use three or more hyphens ( --- ) to create each column's header, and use pipes ( | ) to separate each column. For compatibility, you should also add a pipe on either end of the row. Cell widths can vary, as shown below. The rendered output will look the same.

How do you enter a Markdown code?

There are two ways to format code in Markdown. You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to.


2 Answers

Intellij community edition 2020.3.3

|header 1|header 2|
---|---
|xyz|x|
|xyz|y|
like image 179
Vinicius Escame Avatar answered Nov 15 '22 11:11

Vinicius Escame


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)

like image 20
valeesi Avatar answered Nov 15 '22 11:11

valeesi