Code Syntax - Google Workspace Marketplace

4 min read Original article ↗

Overview

This add-on provides support for code segments and code spans.

Similarly to markdown code segments (aka code blocks) are delimited with triple back-ticks and code spans with single back-ticks.

Additionally, the add-on changes #-heading lines to their corresponding Google Docs™ headings.

When using the 'Colorize' menu item, the add-on finds all code segments and code spans, as well as the headings and handles them. It also updates existing code segments.

The 'Colorize Selection' menu syntax-highlights the current selection according to the chosen language. If no text is selected, does nothing.

The 'Change mode' menu changes the current code segment (where the cursor is) to the chosen language. If the cursor is not in a code segment, does nothing.

Code Syntax will ask for the permissions shown below. Learn more

Code Syntax will need access to your Google account

This will allow Code Syntax to :

View and manage documents that this application has been installed in

View and manage the Google Slides presentations that this application is installed in

See your primary Google Account email address

See your personal info, including any personal info you've made publicly available

Rate & review this app

Share your experience to help others.

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

Could you detail a bit the Help (Readme) ? For example after the 3 back-ticks need a space and your language ("``` js" and not "```js") How do you do the same for single back-ticks ? "` js" does not work and neither "`js". Thanks, it is great :)

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

Florian Loitsch

July 15, 2024

With the latest release triple backticks don't need a space anymore.

Profile Picture

Florian Loitsch

May 22, 2024

The single-ticks don't have any language support. I will try to add support for no-space after the triple backticks as well.

Profile Picture

Ok, I've tried this in Google Docs and it works but you need to write a SPACE between the triple backticks and the language name, otherwise it just messes the formatting. This is not regular markdown but once you know it, you can live with it. The code is then included in a 2 columns table. The first column is very small and empty. It is probably reserved for a future line numbering system. The second column is where your code reside and although the features to convert to another language work and are nice, the colors are quite ugly IMHO. I wish I could change these. Same for the font, which is Roboto Mono. I wish I could at least select another default font. But overall it's a nice plugin and it works better than others.

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

No guidance on how to use it.

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

I'm liking this way better than Code Blocks. It parses your content by itself to do its formatting, rather than me having to select portions manually. And I can use tick marks like I'm used to. It's also superior to other formatters in that, if your code block is at the bottom of the doc, it puts a newline after it. (Without that, you can't put the cursor below the block. So you have to put it inside the block, in which case the block expands when you hit return.) Caveat: I've only been using it for a day.

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

It does what is says on the tin, and it's open source! Also like that it asks for far fewer permissions than Code Blocks

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

Very useful addon! Thanks for the work!

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

I typed: ``` var foo = 'bar'; ``` I clicked the add-on, and clicked "colorize", and it promptly broke.

profile avatar

Your review, profile name and photo will appear publicly in Google’s services. Your review must comply with the Google Workspace Marketplace Comment Guidelines and Review Policies. Learn More

Profile Picture

Florian Loitsch

July 23, 2023

Consider trying the add-on again. Newer versions should be more stable. There is also more documentation now.