Skip to content

Instantly share code, notes, and snippets.

@rajinwonderland
Last active November 28, 2022 20:58
Show Gist options
  • Save rajinwonderland/0a3054822803a5462f7a416bb35f12f3 to your computer and use it in GitHub Desktop.
Save rajinwonderland/0a3054822803a5462f7a416bb35f12f3 to your computer and use it in GitHub Desktop.
VS Code Syntax Highlighting on Keynote

A more detailed guide for copying VSCode themed syntax highlighting over to Keynote. Original Article

Prerequisites

  • VSCode Installed
  • Your favorite or theme installed and configured in your settings.
  • Keynote Installed

Instructions

Step 1:

Navigate to your Keymap Shortcuts

macOS: ⌘K ⌘S

Step 2:

On the Keyboard Shortcuts editor, click on the link keybindings.json

Newer versions have it displayed as a { } icon link on the top right.

Step 3:

Paste the following snippet into your keybindings.json source

{
   "command": "editor.action.clipboardCopyWithSyntaxHighlightingAction", 
   "key": "shift+cmd+c"
 }

You can also configure whichever command you prefer (e.g., "key": "alt+cmd+c")

Test

Highlight and copy a code snippet you'd like to add to Keynote with the shortcut shift+cmd+c

Paste that snippet into Keynote and viola! You can now look like a boss on all of your presentations requiring code snippets from here on out!

Success

If you'd like to check out another way of getting code snippets to display with syntax highlighting, check out this gist that uses highlight.js!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment