ajaxorg/ace — pull request #1314 by rksm (2013-03-18 07:23:48+00:00)
Title: Occur

Occur -- filter lines of current session by a matching term. Does not necessarily require incremental search but using both together makes sense.

See [this screencast](http://youtu.be/RbnkVMJUgJU?hd=1) for how I use it.

If you want to try it out here is my setup code (not included in the PR and requires incremental search):

```js
var occurCmds = require("ace/commands/occur_commands").commands,
iSearchCommands = require("ace/commands/incremental_search_commands").iSearchCommands,
occurStartCmd = occurCmds[0];
iSearchCommands.push({
name: 'occurisearch',
bindKey: 'Ctrl-O',
exec: function(iSearch) {
var options = oop.mixin({}, iSearch.$options);
iSearch.deactivate();
occurStartCmd.exec(iSearch.$editor, options);
},
readOnly: true,
isIncrementalSearchCommand: true
});
```