I really like the Super Ninja Search Options.

What would make search even better would be support for hascode:1, which would find all posts that contain "code sample" markup.

Even though this isn't really code, it would be returned since I formatted it with the curly brackets.

Posts containing only bits of code marked up in-line like this probably shouldn't be returned.

If SE provided this capability it would be easier to treat gis.SE as a code library, as requested here.

  • 4
    I thought this was going to be a rant about unresearched code questions that are basically "giev me teh c0dez!!!1", but this is even better!
    – blah238
    Commented Dec 19, 2011 at 20:18

2 Answers 2


Another thought, code blocks can sometimes be formatted with specific language tags for syntax highlighting. Would it be possible to search for those? Obviously you can already search for questions tagged with a specific language tag but it is not always the case to have a question tagged with the same language that say an answer is formatted with, or with any language.

Something like hascode:c# for example, would return questions/answers with code blocks marked with the <!-- language: c# --> or <!-- language: lang-cs --> markup tags.


This would need to be implemented at the Meta SE level and although it was mentioned as an aside in Improvement of search and search results I don't think it has ever been formally requested.

Consequently, I have set it to (to Meta SE).

You must log in to answer this question.

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