Block Editor: Cmd+Shift+Minus to Toggle Block Outline List View

Block Editor Cmdshiftminus To Toggle Block Outline List View Image

Why limit yourself to default keyboard shortcuts in the Block Editor when you could add extra ones that you’ll probably never remember? (but for me this one’s better 👟 )

What it does…

Allows Mac users to press Cmd+Shift+Minus and see the Block Outline List View.

Why it does it…

There was a time when I found this really useful. Sometimes I’m doing a lot of repetitive work in the WordPress Block Editor, and will toggle this on. Yes, by default, WP offers Shift + Alt + O or ⌃ + ⌥ + O, but I like mine better. And the default is less comfy.

How it does it…

When the Block Editor loads, this adds a javascript that listens for keydown, then triggers a click of the open/close button. You might need to adjust the setTimeout delay if the script is firing before your Block Editor finishes loading.

Use the JSON file for easily importing into your CodeSnippetsPro plugin. Use the PHP file or just copy/paste the code sample into your functions.php if you’re not using CodeSnippetsPro.

Related Snips

Leave a Reply

Your email address will not be published. Required fields are marked *