Demonstration of primitive search/replace functionality. The keybindings (which can be overridden by custom keymaps) are:
Searching is enabled by including addon/search/search.js and addon/search/searchcursor.js. For good-looking input dialogs, you also want to include addon/dialog/dialog.js and addon/dialog/dialog.css.