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

This is a feature request for SO sites. I would like to have highlighting of all strings which match the selected string in code examples.

A number of IDEs and editors have a facility where if I select a string in the code, it highlights all matching strings. For example, with Notepad++, if I'm editing any file, and I select a word (using double-click), then it finds all of the matching words elsewhere in the document.

Example of highlighting from Notepad++

I would find this useful when looking at code to find all usages of a particular identifier. Please note that I'm not asking for semantic highlighting, just that all matching strings get hightlighted. It should, however, be restricted the code blocks. Notepad++, does this highlighting in plain text files.

share|improve this question
Did you mean to post this on Stack Overflow? Meta is for discussing Stack Overflow, not for asking programming questions. – Oded Jun 28 '12 at 14:48
And how do you envisage this would work? You go to a post on a SE site, doubleclick a word in any syntax-highlighted code snippet? Does the word light up in all code snippets in all posts on that page? – Martijn Pieters Jun 28 '12 at 14:49
@Oded: he's a 17k user on SO, I'm assuming he meant this as a feature-request for SE sites. :-) – Martijn Pieters Jun 28 '12 at 14:50
@oded Yes, it's a feature request. I added the tag feature-request and everything. – Matthew Farwell Jun 28 '12 at 14:51
@MartijnPieters Not sure if I want all code snippets on that page, but just one would do for me. – Matthew Farwell Jun 28 '12 at 14:51
Sorry about that - it just doesn't read like it has anything to do with SO. – Oded Jun 28 '12 at 14:52
@oded no worries. Added an explanatory line. – Matthew Farwell Jun 28 '12 at 14:53
Doesn't this imply that folks are posting snippets that are too long? – Arjan Jun 28 '12 at 14:55
@arjan not necessarily, even in a four line code snippet you can have three or four usages of an identifier. And people do post code which is too long. – Matthew Farwell Jun 28 '12 at 14:58
+1 This would be coolness. – Ernest Friedman-Hill Jun 28 '12 at 15:42

You must log in to answer this question.

Browse other questions tagged .