At the moment, code posted to the chat rooms only differs in the font that's used. It would be nice if, like in comments, the code was highlighted by a different background colour. The way it is now, I sometimes get confused about where a piece of code ends.

enter image description here

enter image description here

This works very well in comments. Can we have it in the chat rooms as well?

  • 16
    I like this idea. I have a hard time distinguishing between the regular face and the formatted font face in chat.
    – Marco Ceppi Mod
    Aug 5 '11 at 14:04
  • Agreed. The gist paste-ins even come in as non syntax aware monospace, unless i'm mistaken.
    – lazyPower
    Aug 11 '11 at 4:44
  • 1
    I've always wondered why the "code" looks different in the chat from the normal site!
    – Alvar
    Aug 22 '11 at 10:34
  • 5
    This might add to the clutter in chat. I suggest the highlighting to be much more subtle in chat than on the site.
    – N.N.
    Aug 25 '11 at 12:45
  • 1
    A possible long-term goal could be basic syntax highlighting like in gedit (within said code blocks of course). (Probably will never be supported, but I find it easier to interpret code if it's color-coded according to argument types.) Jun 23 '12 at 19:50

I don't think that's a very necessary need. A chat room is dominantly for chatting, where too much functionality can add to the chaos. For examples, suppose a chat with lots of background-highlighted code (or even syntax-highlighted), images, much icons, and other functionality. It'll be very disorderly and won't be conductive to the nature of "chats," which differ considerably from descriptive and detailed talking.

Most people are able to differentiate the main body and code body. Codes always have a different language than simple English, with the inclusion of many symbolic characters. That coupled with font-variation is well suited for this job.

  • 4
    I disagree with this as it is not always the case. Sometime your code is just one word in your sentence. Failing to notice that it's a code block can render your sentence meaningless or hard to understand.
    – Dan
    Jul 22 '14 at 6:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .