Fork me on GitHub
#slack-help
<
2016-02-24
>
roti18:02:33

Hi, what is the recommended way to post code snippets?

seancorfield19:02:54

@roti: If you click on the + to the left of the input box, it will give the option to create a snippet. A lot of people also use Gists (on GitHub) if they want others to be able to fork and/or edit code for discussion. http://refheap.com is another option (built with Clojure/ClojureScript I believe?).

roti19:02:37

yes, I tried that, but it seemed to have created a file

roti19:02:46

untitled, of course

roti19:02:14

i was looking to post a simple message, but nicely formatted as a quote or code

seancorfield19:02:24

Also, if you paste multiple lines into the input box, I think it will automatically offer to make a snippet out of it — but that may depend on how you have Slack configured (I know that multi-line code entered with three backticks is treated as separate messages by default which is silly and you have to change the default!).

seancorfield19:02:44

You mean

Something like
this inline in the
message?

seancorfield19:02:52

Then you can type three backticks

and some code
and more code on a new line
and then three backticks 
and the rest of your message.

roti19:02:08

ok, so it's like in the github markdown

roti19:02:16

yep, thanks

seancorfield19:02:40

I’m not sure if it understands specific code flavors tho’… I suspect not…

roti19:02:03

that's not so important