What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

Possible Duplicate:
Allow highlighting certain bits of a code fragment or quote

Sometimes I need to paste a large lump of code, as in context it is all relevant, but I would like people to perhaps start reading the code from a specific point, or to bring their attention to a specific part of the code first instead of them having to trawl linearlly through initially irrelevant stuff.

It would be good to have code highlighting I think.

For example:

alt text

share|improve this question

marked as duplicate by The Unhandled Exception, Pops, kiamlaluno, ChrisF, Lorem Ipsum Jan 28 '12 at 22:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 4 down vote accepted

My gut feeling is that if you need such a feature, then you already pasted too much code.

  • Explain the problem in specific terms - what is failing and how.
  • Paste only the code that is necessary (the one you would like to highlight).
  • If necessary - or if people ask you for it, add a few lines of code that detail how the previous relevant code is initialized, how it is used, etc.

EDIT: If you feel that you have a question for which those guidelines fail, then feel free to post a link to it. I'd rather teach you how to phrase better questions.

share|improve this answer

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