How to display code blocks in Medium

(and other less important formatting things)

To begin a block of text as code in Medium’s editor, press Cmd-6.

You can also highlight a portion of text, then press Cmd-6 to separate it into a code block.

It looks like this:

var string = “hello world!”;

In general, hit Cmd-? to pull up a menu of all available shortcuts.

Show your support

Clapping shows how much you appreciated Joey Yang’s story.