How to show code blocks in Medium

(on a Mac)

Highlight a portion of text, then press ⌘+Alt+6 to make it into a code block.

It looks like this:

var string = “All your codes are belong to us”;

To get other hints and formatting powers that are not in pop up formatting menu, press Cmd-? to pull up a menu of all available shortcuts right inside Medium.

It looks like this:

Image for post
Image for post

I originally found this article, but the PC command doesn’t work on a Mac, so I wrote this one.

Now go forth and conquer with your new formatting powers.

Image for post
Image for post

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store