5 ms·
``` Is widely supported to add code. E.g. in Slack, Confluence...
by nrhrjrjrjtntbt 1y ago
```
Is widely supported to add code. E.g. in Slack, Confluence...
- Osyris 1y agoBoth examples you gave have pretty rough or nonexistent syntax highlighting support.
- kelnos 1y agoWho cares? If I really really really need that (I probably won't), I can open up vim, type `:set filetype=whatever`, and paste it in.
- machomaster 1y agoMany people care. Hence, the screenshots.
- nrhrjrjrjtntbt 1y agoIf it is that essential do both.
- johnisgood 1y agoUh oh, even Discord has syntax highlighting support with "```".
- nvllsvm 1y agoSlack seems to always wrap code blocks. It makes python particularly shit to read.
- pmontra 1y agoIn my experience copying from some programs preserves long lines. Copying from other programs breaks them at the wrap point. Once the text is cut into lines, pasting can't fix it. I'm not at my computer now so I can't give factual examples. I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.
- unixplumber 1y ago> I guess that copying from the output of cat file on a terminal is one of those unfortunate cases. It depends on the terminal. Some will actually preserve the line breaks vs soft wraps. Those terminals will reflow the text when you resize the window. But if you already have the file you might as well run something like `xclip <file` to copy its contents directly to the clipboard.
- nrhrjrjrjtntbt 1y agoIf it is that much code attach a file or github link to gist or PR.
- nvllsvm 1y agoThat's too much friction - especially since managed users cannot even create Gists in GitHub Enterprise Cloud (ugh). https://docs.github.com/en/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/abilities-and-restrictions-of-managed-user-accounts#other-restrictions https://docs.github.com/en/enterprise-cloud@latest/admin/man... As for attaching a file, I'm usually screenshotting small amounts of code - usually of the ephemeral variety.
- smallerize 1y agoEven Google chat can do it.
- crazygringo 1y agoIt's not widely supported. It's not in e-mail or SMS or Gmail or Docs or Word or a hundred other pieces of software where I communicate. Yes, I use that wherever it exists. It's great, and you're lucky when it's there. I wish it was everywhere. But as long as it's not, for everything else, there's screenshots.
- msl 1y agoSMS does not support images either, and email supports HTML. I'm not all that familiar with Word, but I believe it supports some formatting options too.
- stavros 1y agoBut all of the software you mention has a monospace option.
- crazygringo 1y agoThe discussion isn't about monospace. It's about horizontal scroll rather than wrapping lines. And no, no SMS client I've ever seen uses a monospaced font.
- phito 1y agoIt's so bad in teams and they put a rather small character limit on it....