Best ever feature on Apple Notes

You can activate code blocks using ⌘ + ⇧ + M on Apple notes.

Best ever feature on Apple Notes
Photo by Jessy Smith / Unsplash

Apple Notes now supports code blocks—an amazing feature I’ve always wanted!

Apple notes serves as a knowledge store for me. In the past, adding a code block and editing them would lead to formatting changes making the process cumbersome and leading to errors. But now, that's no longer the case.

Let's see how to activate code blocks on these tools.

Activating code blocks on Apple Notes

  1. Press cmd + shift + m ⌘ + ⇧ + m
Code block is activate by clicking ⌘ + ⇧ + M. ⌘ + ⇧ + m works too! (no need to turn on Caps lock!)
  1. Now, you can enter your code block.
Earlier, if you try to edit "Hello World!", the quotes will be changed to forward/backward quotes - leading to problems.

Bonus:

You can add code blocks on Google docs as well.

The shortcut for this is to enter the backtick button three times and press Enter (similar to Slack)

```

Three times enter backtick button and Enter.

This feature is not available on all Google accounts for some reason.

If this doesn't work, use the Google Doc linked below, where I have already added a code block. Simply copy and paste it into your document as needed, even if the shortcut doesn’t work.

Code block formatter in Google docs