ported code_search to spice2

the code styling is completely wrong, particularly, the line formatting
is grossly exaggerated. this should be fixed along with the rest of the
spice2 style issues in commits to come on core