58

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.

6
  • 3
    Yeah. I didn't know you could search code like that, either. – Dave Newton Sep 10 '12 at 15:18
  • 3
    I hope they do this and that they note that the searches are case sensitive – Some Helpful Commenter Sep 10 '12 at 17:00
  • how does this even get done? i have the privilege but not the opportunity! – ocæon Apr 3 '19 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 Oct 26 '19 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 May 8 '20 at 1:39
  • @Shog9 Well, that sounds like... not much fun at all, but into the backlog it goes. – Adam Lear May 8 '20 at 16:29
17
+500

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.

2

You must log in to answer this question.

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