You can write whatever specific functionality you want via a plug-in. I was just tinkering around with this so here are the commands fresh from my memory.
To get you started:
[code]import sublime, sublime_plugin
class ExampleCommand(sublime_plugin.TextCommand):
def run(self, edit):
[/code]
This will get you the current selection:
SearchTerm = self.view.substr(self.view.sel()[0])
This will let you find all matches for that text:
RegionsResult = self.view.find_all(SearchTerm, sublime.IGNORECASE)
This will clear the old selection:
self.view.sel().clear()
This will select the second occurance of SearchTerm in the document
self.view.sel().add(sublime.Region(RegionsResult[1].a, RegionsResult[1].b))
If you want your own input panel, you can use:
[code]self.view.window().show_input_panel(“Please enter custom incremental search text:”, “”, self.on_done, None, None)
def on_done(self, text):
RegionsResultFromInputPanel = self.view.find_all(text, sublime.IGNORECASE)
[/code]
These commands (taken from the menu) may also help you:
[quote] { “command”: “find_under”, “caption”: “Quick Find” },
{ “command”: “find_all_under”, “caption”: “Quick Find All” },
{ “command”: “find_under_expand”, “caption”: “Quick Add Next” },
{ “command”: “slurp_find_string”, “caption”: “Use Selection for Find” },
[/quote]