Syntax Highlighting on Slack

How to do syntax highlighting on Slack. Part of our Slack mini series.

I’ve previously written before about simple formatting on Slack but what if you want to add syntax highlighting?

Say you want to share a block of Ruby code with a colleague and a simple code block just won’t cut it?

Slack has a solution for you!

If you click on the + symbol at the side of the text entry box, you will see an option for Code or text snippet, click on this. A pop out will appear. You can paste or type your code block into the large text input box. Then if you click on the drop down in the top right corner, you can select the language you’d like to format to. It has many popular languages such as C#, JavaScript, and HTML. It also has a text wrap option. From this view you can choose which room you’d like to share the code snippet.

This is part of our Slack mini series, where we quickly explain simple and more advanced Slack features. Excellent for beginners or if you just need a quick refresher.

If there is a feature you would like us to cover please drop us an email or tweet.

Recent posts View all

Conferences

Tips for how to ask for time off to attend conferences

Asking for time off to attend a conference can be nerve-racking, these tips will get you closer to attending the conferences you're interested in.

Ruby

Using the 'it' Gem to add links to translations

How to can use the 'it' Gem to add links to your translations