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

sharing code snippets

How to share code snippets in Slack

  1. Click the + plus icon to the left of the message field and select Create Snippet from the menu.
  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.
    collaborate on code snippets in channel

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?



Thanks so much for your feedback!

Got it!

Thanks for your feedback.

Oops! We're having trouble. Please try again later!