Syntax highlighting is surely a good thing to have in answers here, as it makes the unreadable code more readable.

However, many users, especially new users, may not know about it, and even if they do notice that some posts have enabled syntax highlighting, they may not know how to use it.

Also, there were many edits that only add syntax highlighting, and I don't think it is a very nice idea to perform such trivial edits.

So, do you think that it would be good to encourage the use of syntax highlighting? And if you do, how should we do it? Perhaps mention it in the FAQ? Or, if possible, in the formatting help?

  • 2
    \$\begingroup\$ The way I "learned" about it was someone editing one of my posts to add highlighting. I certainly knew about it before, but I got used to not thinking about it, since SO does it automatically by tag for the vast majority of posts. I don't think it's something we really need to go out of our way to emphasize, though. People who care will find out how it's done when they see it, people who don't care, well... don't care. \$\endgroup\$
    – Geobits
    Mar 28, 2014 at 20:10
  • \$\begingroup\$ I think that the best way to do it would be to go to meta.stackoverflow.com and campaign for a button in the editor. \$\endgroup\$ Mar 28, 2014 at 20:40
  • 1
    \$\begingroup\$ @PeterTaylor Chances of that having any effect are very slim, given that a trivially fixed CSS bug still hasn't been fixed after nearly two years. Adding a note to the FAQ would be a step in the right direction. \$\endgroup\$
    – r3mainer
    Mar 28, 2014 at 20:59
  • \$\begingroup\$ @squeamishossifrage 2,215 questions tagged feature-request, status-completed, not bug \$\endgroup\$
    – Doorknob
    Mar 28, 2014 at 21:03
  • \$\begingroup\$ @Doorknob Well in that case just be sure not to tag it as a bug! \$\endgroup\$
    – r3mainer
    Mar 28, 2014 at 21:23
  • \$\begingroup\$ Perhaps we could add a few links to the list of language class tags as this resource would be hugely helpful to folks that want to syntax highlight but don't yet know the "magic". \$\endgroup\$ Apr 1, 2014 at 16:21


You must log in to answer this question.

Browse other questions tagged .