A more detailed guide for copying VSCode themed syntax highlighting over to Keynote. Original Article
- VSCode Installed
- Your favorite or theme installed and configured in your settings.
- Keynote Installed
Navigate to your Keymap Shortcuts
macOS:
⌘K ⌘S
On the Keyboard Shortcuts editor, click on the link keybindings.json
Newer versions have it displayed as a
{ }
icon link on the top right.
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"
)
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!
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!