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.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.