Hacker News new | past | comments | ask | show | jobs | submit login

I'm a coder and have been using slack for years with success. Not one single one of your complaints has ever been an issue for me.

Whenever I want to post a code snippet, I just use the triple backtick technique, like:

``` code goes here ```

You can also insert code in the middle of a comment with a single backtick around it: `like so`

For the most part, though, I keep my code in the Git repository, and it's pretty rare that I actually need to share a bunch of code in Slack messages. If I want to pair with another developer I just open up Tuple or Zoom and do a screen share.




Syntax highlighting in a message is really powerful if your message includes a series of diffs.

    ```diff
    - Remove this line
    + Add this line
    ```
But even if developers are fine with highlighted code snippets inside message, that still leaves the buggy snippet tool which adds newlines when you copy-paste from it, not enumerated, or bulleted lists, no hyperlinks except verbatim, etc. The no hyperlink part is annoying if you have to link a couple or more long urls and placement matters.

Edit: To add to the list, since slack doesn’t use real markdown it is impossible to included backticks in code samples (e.g. `` ` `` is not a thing, and neither is ```` ``` ````).


Yeah if I feel like my snippet could benefit from syntax highlighting I’m probably doing it wrong. I can’t imagine other people would appreciate my giant walls of text/code in a chat channel. I can use a gist, screen share or link to a specific line in a repo if I need to.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: