Sani Syntax Palette

Sani Syntax Palette is a Google Slides™ and Google Docs™ add-on that applies syntax highlighting to source code and pseudocode inside the file you have open.

What this add-on does: you can select code in a Google Slides™ presentation or a Google Docs™ document and apply colour to its keywords, strings and comments. It supports C, C++, Python, JavaScript and pseudocode; in pseudocode, variables become italic and keywords become upright and bold. It is free.

Google Slides™ · Docs™ C · C++ · Python · JavaScript Pseudocode formatting Free
Install

Currently under review on Google Workspace Marketplace™.

Features

Works on code already in the document, and on code you paste in.

Apply to existing code

Select code already typed into the document and the formatting is applied in place. Useful for cleaning up lecture notes or assignments you have already written.

Insert new code

Paste code into the sidebar and it is highlighted and inserted at the cursor. You can add a background block behind the code at the same time.

Visual Studio Code themes

Uses the Light+ and Dark+ colours from Visual Studio Code, down to giving control-flow keywords a different colour from declaration keywords.

Automatic language detection

If you do not pick a language, the add-on infers it from the code. Strings, comments, numbers, function names and types are each distinguished.

Python · Dark+
def solve(nums):
    total = 0              # running sum
    for i, v in enumerate(nums):
        if v % 2 == 0:
            total += v
    return total

Pseudocode formatting

In pseudocode, keywords and variables are distinguished by typeface rather than colour.

Pseudocode · Light+
maxScore(x[], n):
    bestx[1]
    for i ← 2 to n
        if x[i] > best then update the maximum
    return best
ElementStyle
Variable and array namesItalic
KeywordsUpright and bold
Numbers and procedure namesUpright
CJK textUpright — Korean, Chinese and Japanese have no italic forms, so they are left alone
Body fontChosen in the sidebar (Courier New by default)

The keyword list is editable in the sidebar. Your edited list is saved to your account and kept the next time you open a document, and matching is case-insensitive. When code is inserted, <- <= >= != are converted to .

How your data is handled

Nothing is collected.

Scope of accessThe single document you currently have open. No other file in your Google Drive™ can be reached
TransmissionNone. All processing runs inside your own Google account
StorageDocument content is never stored. Only your own display settings, such as the keyword list, are kept
Analytics and trackingNone. No usage data is collected

Read the full privacy policy →

Install

An install link will be posted here once the Google Workspace Marketplace™ review is complete.

Supported hostsGoogle Slides™, Google Docs™
PriceFree
Permissions requiredAccess to the current document; display of a sidebar

Developer

Questions and bug reports are welcome.

Sani

This add-on came out of the friction of preparing computer science course material. It covers C, C++, Python, JavaScript and pseudocode.

Contact
dinosinfolee@gmail.com
Website
syntax-palette.sanskit.com
Product
Sani Syntax Palette