Google adding code formatting to Docs

Google is expanding its “smart canvas” system in Docs to include code blocks that will automatically add the proper spacing and colour-coding for a variety of programming languages, the company announced.

Supported programming languages include Python, C, and JavaScript. However, the feature is only available for certain higher-tier Google Workplace accounts.

Google says Workspace Business Standard, Business Plus, Enterprise Standard, Enterprise Plus, Education Standard, Education Plus customers, and Nonprofits accounts will get the feature.

To access the code blocks feature, users must click Insert, Building blocks, Code blocks, and then select their programming language.

Alternatively, users can type “@project assets” to pull up the menu.

Regarding availability, Google is rolling out the new feature in two phases. It will add code blocks for rapid-release domains from 14 December 2022.

It will start rolling out to “scheduled release domains” on 3 January 2023. However, Google notes that it may take an additional 15 days for the feature to be visible to end users for both rollout phases.

Currently, formatting code in Google Docs is somewhat cumbersome, requiring workarounds or add-ons to achieve.

The code blocks feature will help to simplify formatting for eligible Google Docs users.

Now read: We built a flash drive that hacks any computer

Latest news

Partner Content

Show comments


Share this article
Google adding code formatting to Docs