After Search just code we now have a way to search code, so something like code:"-->" searches for the infamous --> "operator". (Protip: it's not an operator, it's two)

Could this be added to the Search Tips page so it's discoverable? On Stack Overflow it's extremely helpful, and I only just heard about it a year after joining SO and being very active on the network.

  • 3
    Yeah. I didn't know you could search code like that, either. Commented Sep 10, 2012 at 15:18
  • 3
    I hope they do this and that they note that the searches are case sensitive Commented Sep 10, 2012 at 17:00
  • how does this even get done? i have the privilege but not the opportunity!
    – ocæon
    Commented Apr 3, 2019 at 19:59
  • That's not a great UI for performing such a search. It works to use code::set on emacs.SE, but it's not very clear that you're really looking for the exact string :set. Maybe more importantly, it's not clear that people will think to do (or find out how to do) code: to search for a literal sequence of chars.
    – Drew
    Commented Oct 26, 2019 at 1:21
  • 2
    Eh, @adam - if you're planning to fix symbol indexing as part of this, might wanna roll back the change here too: meta.stackoverflow.com/questions/368516/…
    – Shog9
    Commented May 8, 2020 at 1:39
  • @Shog9 Well, that sounds like... not much fun at all, but into the backlog it goes.
    – Adam Lear StaffMod
    Commented May 8, 2020 at 16:29

1 Answer 1


We've finally added the code:"x" syntax into the search tips on /search! It only took us... checking my notes here ...8 years. Oof. Sorry about that. Thanks for the request, we really appreciate it.

  • 6
    No one is complaining. Between 6 to 8 is what we expect ... :D
    – rene
    Commented Jul 10, 2020 at 19:13
  • 1
    This deserves 600-800 rep. Commented Oct 28, 2020 at 9:43

You must log in to answer this question.

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