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.