Share code snippets

What’s it handy for?

Working with computer programmers means they’ll want to discuss and debate the best ways to write code, and for that, they’ll need a way to share code snippets. Here’s how you can do that in Slack.

Sharing code snippets is necessary for:

  • Discussing best practices for coding
  • Finding and fixing bugs in your software
  • Offering suggestions and improvements

long code snippet sent in slack

How to share code snippets in Slack

  1. Click the shortcut lightning icon and search for Create a text snippet
    Share code snippet in Slack
  2. Paste your code snippet in the form and select the programming language from the drop-down menu. You can optionally give it a title and add a message explaining the snippet to others in the channel.
    create Python code snippet
  3. You can use threads to organize improvements, suggestions, or changes with others.
    slack message including a code snippet

Also worth checking out

Slack’s built-in code snippets offer basic support for sharing code but apps like Cacher offer improved versions, while Github offers an array of options. Sober is another app for Slack and calls up code from your Github files in Slack directly.

Was this tip useful?


Nice one!

Thanks a lot for your feedback!

Got it!

Thanks for your feedback.

Whoops! We’re having some problems. Please try again later.