Google Docs Now Has Code Blocks, but Not for Everyone – How-To Geek

Posted under Programming, Technology On By James Steward

Join 425,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.
By submitting your email, you agree to the Terms of Use and Privacy Policy.
Corbin Davenport is the News Editor at How-To Geek, an independent software developer, and a podcaster. He previously worked at Android Police, PC Gamer, and XDA Developers. Read more…
Google Docs logo on a white background
Google Docs is one of the most popular ways to create and share text documents, but up until now, sharing code samples has been a bit cumbersome. That’s finally changing.
Google said in a blog post today, “currently, when working in Google Docs, collaborators who want to present code have to paste it in the document and then manually apply styles by highlighting syntax. We’re adding a new smart canvas feature that makes this process much easier by enabling you to format and display code in Docs with code blocks.”
There’s a new option to insert a code block rolling out, accessible from Insert > Building blocks > Code block. From there, you can pick from a few different programming languages, such as Java, Python, C++, and JavaScript. Google Docs will then create a block and provide the correct color formatting for the selected language. You can also just type the @ symbol in a document, then “code blocks.”
The new code blocks should come in handy for anyone working on programming tutorials, code project examples, or anything else in Google Docs that might need to include code samples.
Google says the feature should roll out within the next 15 days, but it’s not available to personal Google accounts (e.g. Gmail logins) yet, only Workspace accounts provided by a company or other organization. It’s not clear when, or if, everyone will be able to try it.
Source: Google Workspace Updates
Facebook
Instagram
Twitter
LinkedIn
RSS Feed
The Best Free Tech Newsletter Anywhere
By submitting your email, you agree to the Terms of Use and Privacy Policy.

source

Note that any programming tips and code writing requires some knowledge of computer programming. Please, be careful if you do not know what you are doing…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.